home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Source / GNU / cc / Makefile.in < prev    next >
Makefile  |  1994-05-13  |  90KB  |  2,327 lines

  1. # Makefile for GNU C compiler.
  2. #   Copyright (C) 1987, 88, 90, 91, 92, 1993 Free Software Foundation, Inc.
  3.  
  4. #This file is part of GNU CC.
  5.  
  6. #GNU CC is free software; you can redistribute it and/or modify
  7. #it under the terms of the GNU General Public License as published by
  8. #the Free Software Foundation; either version 2, or (at your option)
  9. #any later version.
  10.  
  11. #GNU CC is distributed in the hope that it will be useful,
  12. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. #GNU General Public License for more details.
  15.  
  16. #You should have received a copy of the GNU General Public License
  17. #along with GNU CC; see the file COPYING.  If not, write to
  18. #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20. # The targets for external use include:
  21. # all, doc, proto, install, install-cross, install-cross-rest,
  22. # uninstall, TAGS, mostlyclean, clean, distclean, realclean,
  23. # stage1, stage2, stage3, stage4.
  24.  
  25. # Suppress smart makes who think they know how to automake Yacc files
  26. .y.c:
  27.     
  28. # Variables that exist for you to override.
  29. # See below for how to change them for certain systems.
  30.  
  31. # Selection of languages to be made.
  32. LANGUAGES = c c++ objective-c++ objective-c proto
  33.  
  34. ALLOCA =
  35. ALLOCA_FLAGS =
  36. ALLOCA_FINISH = true
  37.  
  38. # Various ways of specifying flags for compilations:  
  39. # CFLAGS is for the user to override to, e.g., do a bootstrap with -O2.
  40. # BOOT_CFLAGS is the value of CFLAGS to pass
  41. # to the stage2 and stage3 compilations
  42. # XCFLAGS is used for most compilations but not when using the GCC just built.
  43. XCFLAGS =
  44. CFLAGS = -g
  45. BOOT_CFLAGS = -O $(CFLAGS)
  46. # These exists to be overridden by the x-* and t-* files, respectively.
  47. X_CFLAGS =
  48. T_CFLAGS =
  49.  
  50. X_CPPFLAGS =
  51. T_CPPFLAGS =
  52.  
  53. CC = cc
  54. BISON = bison
  55. BISONFLAGS =
  56. AR = ar
  57. OLDAR_FLAGS = qc
  58. AR_FLAGS = rc
  59. SHELL = /bin/sh
  60. # on sysV, define this as cp.
  61. INSTALL = install -c
  62. # These permit overriding just for certain files.
  63. INSTALL_PROGRAM = $(INSTALL)
  64. INSTALL_DATA = $(INSTALL)
  65. SYMLINK = ln -s
  66. MAKEINFO = makeinfo
  67. TEXI2DVI = texi2dvi
  68.  
  69. # Define this as & to perform parallel make on a Sequent.
  70. # Note that this has some bugs, and it seems currently necessary 
  71. # to compile all the gen* files first by hand to avoid erroneous results.
  72. P =
  73.  
  74. # How to invoke ranlib.
  75. RANLIB = ranlib
  76. # Test to use to see whether ranlib exists on the system.
  77. RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
  78.  
  79. # Compiler to use for compiling libgcc1.a.
  80. # OLDCC should not be the GNU C compiler,
  81. # since that would compile typical libgcc1.a functions such as mulsi3
  82. # into infinite recursions.
  83. OLDCC = cc
  84.  
  85. # CFLAGS for use with OLDCC, for compiling libgcc1.a.
  86. # NOTE: -O does not work on some Unix systems!
  87. CCLIBFLAGS = -O
  88.  
  89. # Version of ar to use when compiling libgcc1.a.
  90. OLDAR = ar
  91.  
  92. # Target to use when installing include directory.  Either
  93. # install-headers-tar or install-headers-cpio.
  94. INSTALL_HEADERS_DIR = install-headers-tar
  95.  
  96. # The GCC to use for compiling libgcc2.a, enquire, and cross-test.
  97. # Usually the one we just built.
  98. # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
  99. GCC_FOR_TARGET = ./xgcc -B./
  100.  
  101. # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
  102. # It omits XCFLAGS, and specifies -B./.
  103. # It also specifies -B$(tooldir)/ to find as and ld for a cross compiler.
  104. GCC_CFLAGS=$(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS)
  105.  
  106. # Special flags for compiling enquire.
  107. # We disable optimization to make floating point more reliable.
  108. ENQUIRE_CFLAGS = -DNO_MEM -DNO_STDDEF -DNO_LONG_DOUBLE_IO -O0
  109. ENQUIRE_LDFLAGS = $(LDFLAGS)
  110.  
  111. # Tools to use when building a cross-compiler.
  112. # These are used because `configure' appends `cross-make'
  113. # to the makefile when making a cross-compiler.
  114.  
  115. TARGET_TOOLPREFIX = $(tooldir)/bin/
  116. AR_FOR_TARGET = $(TARGET_TOOLPREFIX)ar
  117. AR_FOR_TARGET_FLAGS = rc
  118. RANLIB_FOR_TARGET = $(TARGET_TOOLPREFIX)ranlib
  119. RANLIB_TEST_FOR_TARGET = [ -f $(TARGET_TOOLPREFIX)ranlib ]
  120.  
  121. # Dir to search for system headers.  Overridden by cross-make.
  122. SYSTEM_HEADER_DIR = /usr/include
  123.  
  124. # Control whether to run fixproto.
  125. %if next-headers
  126. STMP_FIXPROTO = 
  127. %else next-headers
  128. STMP_FIXPROTO = stmp-fixproto
  129. %endif next-headers
  130.  
  131. # There may be a premade insn-attrtab.c for this machine.
  132. # (You could rebuild it with genattrtab as usual, but it takes a long time.)
  133. # PREMADE_ATTRTAB is the file name of the file to use.
  134. # PREMADE_ATTRTAB_MD is the md file it corresponds to.
  135. PREMADE_ATTRTAB_MD = Makefile  # Guaranteed not to cmp equal to md.
  136. PREMADE_ATTRTAB = 
  137.  
  138. target= ... `configure' substitutes actual target name here.
  139. xmake_file= ... `configure' substitutes actual x- file name here.
  140. tmake_file= ... `configure' substitutes actual t- file name here.
  141. version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
  142. mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
  143.  
  144. # Directory where sources are, from where we are.
  145. srcdir = .
  146. # Common prefix for installation directories.
  147. # NOTE: This directory must exist when you start installation.
  148. prefix = /usr/local
  149. # Directory in which to put localized header files. On the systems with
  150. # gcc as the native cc, `local_prefix' may not be `prefix' which is
  151. # `/usr'.
  152. # NOTE: local_prefix *should not* default from prefix.
  153. local_prefix = /usr/local
  154. # Directory in which to put host dependent programs and libraries
  155. exec_prefix = $(prefix)
  156. # Directory in which to put the executable for the command `gcc'
  157. bindir = $(exec_prefix)/bin
  158. # Directory in which to put the directories used by the compiler.
  159. libdir = $(exec_prefix)/lib
  160. # Directory in which the compiler finds executables, libraries, etc.
  161. libsubdir = $(libdir)/gcc-lib/$(target)/$(version)
  162. # Directory to search for site-specific includes.
  163. includedir = $(local_prefix)/include
  164. # assertdir is overridden in cross-make.
  165. # (But this currently agrees with what is in cross-make.)
  166. assertdir = $(tooldir)/include
  167. # where the info files go
  168. infodir = $(prefix)/info
  169. # Extension (if any) to put in installed man-page filename.
  170. manext = .1
  171. # Directory in which to put man pages.
  172. mandir = $(prefix)/man/man1
  173. # Directory in which to find other cross-compilation tools and headers.
  174. # Used in install-cross.
  175. tooldir = $(exec_prefix)/$(target)
  176. # Dir for temp files.
  177. tmpdir = /tmp
  178.  
  179. # Additional system libraries to link with.
  180. CLIB=
  181.  
  182. # Change this to a null string if obstacks are installed in the
  183. # system library.
  184. OBSTACK=obstack.o
  185.  
  186. # Specify the rule for actually making libgcc.a,
  187. LIBGCC = libgcc.a
  188. # and the rule for installing it.
  189. INSTALL_LIBGCC = install-libgcc
  190.  
  191. # Specify the rule for actually making libgcc1.a.
  192. # The value may be empty; that means to do absolutely nothing
  193. # with or for libgcc1.a.
  194. LIBGCC1 = libgcc1.a
  195.  
  196. # Specify the rule for making libgcc1.a for a cross-compiler.
  197. # The default rule assumes that libgcc1.a is supplied by the user.
  198. CROSS_LIBGCC1 = libgcc1.cross
  199.  
  200. # Specify the rule for actually making libgcc2.a.
  201. LIBGCC2 = libgcc2.a
  202.  
  203. # Options to use when compiling libgcc2.a.
  204. # -g1 causes output of debug info only for file-scope entities.
  205. # we use this here because that should be enough, and also
  206. # so that -g1 will be tested.
  207. LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) -g1
  208.  
  209. # Additional options to use when compiling libgcc2.a.
  210. # Some targets override this to -Iinclude
  211. LIBGCC2_INCLUDES =
  212.  
  213. # Things which must be built before building libgcc2.a.
  214. # Some targets override this to stmp-int-hdrs
  215. LIBGCC2_DEPS =
  216.  
  217. # Enquire target (This is a variable so that a target can choose not to
  218. # build it.)
  219. ENQUIRE = enquire
  220.  
  221. # Cross-test target (must also be overridable for a target)
  222. CROSS_TEST = cross-test
  223.  
  224. # List of extra executables that should be compiled for this target machine
  225. # that are used for compiling from source code to object code.
  226. # The rules for compiling them should be in the t-* file for the machine.
  227. EXTRA_PASSES =
  228.  
  229. # Like EXTRA_PASSES, but these are used when linking.
  230. EXTRA_PROGRAMS = 
  231.  
  232. # List of extra object files that should be compiled for this target machine.
  233. # The rules for compiling them should be in the t-* file for the machine.
  234. EXTRA_PARTS =
  235.  
  236. # List of extra object files that should be compiled and linked with
  237. # compiler proper (cc1, cc1obj, cc1plus).
  238. EXTRA_OBJS =
  239.  
  240. # List of additional header files to install.
  241. # Often this is edited directly by `configure'.
  242. EXTRA_HEADERS =
  243.  
  244. # Set this to `ld' to enable use of collect2.
  245. # USE_COLLECT2 =
  246. # It is convenient for configure to add the assignment at the beginning,
  247. # so don't override it here.
  248.  
  249. # List of extra C and assembler files to add to libgcc1.a.
  250. # Assembler files should have names ending in `.asm'.
  251. LIB1FUNCS_EXTRA = 
  252.  
  253. # List of extra C and assembler files to add to libgcc2.a.
  254. # Assembler files should have names ending in `.asm'.
  255. LIB2FUNCS_EXTRA = 
  256.  
  257. # Default float.h source to use for cross-compiler.
  258. CROSS_FLOAT_H=float.h-cross
  259.  
  260. # Program to convert libraries.
  261. LIBCONVERT = 
  262.  
  263. # Control whether header files are installed.
  264. INSTALL_HEADERS=install-headers
  265.  
  266. # Options for tar when copying trees.  So HPUX can override it.
  267. TAROUTOPTS = xpBf
  268.  
  269. # Select which version of fixincludes to use (I.E. regular versus SVR4)
  270. # This value is overridden directly by configure.
  271. FIXINCLUDES=fixincludes
  272.  
  273. # Additional directories of header files to run fixincludes on.
  274. # These should be directories searched automatically by default
  275. # just as /usr/include is.
  276. # *Do not* use this for directories that happen to contain 
  277. # header files, but are not searched automatically by default.
  278. # On most systems, this is empty.
  279. OTHER_FIXINCLUDES_DIRS=
  280.  
  281. # List of things which should already be built whenever we try to use xgcc
  282. # to compile anything (without linking).
  283. GCC_PASSES=xgcc cc1 cpp $(EXTRA_PASSES)
  284.  
  285. # List of things which should already be built whenever we try to use xgcc
  286. # to link anything.
  287. GCC_PARTS=$(GCC_PASSES) $(LIBGCC) $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
  288.  
  289. # Directory to link to, when using the target `maketest'.
  290. DIR = ../gcc
  291.  
  292. # Guaranteed to not exist when not passing md through cpp.
  293. MD_FILE = md-cpp-not-used
  294.  
  295. # Flags to use when cross-building GCC.
  296. # Prefix to apply to names of object files when using them
  297. # to run on the machine we are compiling on.
  298. HOST_PREFIX=
  299. # Prefix to apply to names of object files when compiling them
  300. # to run on the machine we are compiling on.
  301. # The default for this variable is chosen to keep these rules 
  302. # out of the way of the other rules for compiling the same source files.
  303. HOST_PREFIX_1=loser-
  304. HOST_CC=$(CC)
  305. HOST_CFLAGS=$(ALL_CFLAGS)
  306. HOST_CLIB=$(CLIB)
  307. HOST_LDFLAGS=$(LDFLAGS)
  308. HOST_CPPFLAGS=$(ALL_CPPFLAGS)
  309. HOST_ALLOCA=$(ALLOCA)
  310. HOST_MALLOC=$(MALLOC)
  311. HOST_OBSTACK=$(OBSTACK)
  312.  
  313. # Choose the real default target.
  314. ALL=all.internal
  315.  
  316. # Choose the real install target.
  317. INSTALL_TARGET=install-normal
  318.  
  319. # Source for float.h.  Overridden by cross-make.
  320. FLOAT_H=float.h-nat
  321.  
  322. # End of variables for you to override.
  323.  
  324. # Definition of `all' is here so that new rules inserted by sed
  325. # do not specify the default target.
  326. # The real definition is under `all.internal' (for native compilers)
  327. # or `all.cross' (for cross compilers).
  328. all: all.indirect
  329.  
  330. # This tells GNU Make version 3 not to put all variables in the environment.
  331. .NOEXPORT:
  332.  
  333. # sed inserts variable overrides after the following line.
  334. ####target overrides
  335. ####host overrides
  336. ####cross overrides
  337. ####build overrides
  338.  
  339. # Now figure out from those variables how to compile and link.
  340.  
  341. all.indirect: $(ALL)
  342.  
  343. # IN_GCC tells obstack.h to use gstddef.h.
  344. INTERNAL_CFLAGS = $(CROSS) -DIN_GCC
  345.  
  346. # This is the variable actually used when we compile.
  347. ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) $(CFLAGS) $(XCFLAGS)
  348.  
  349. # Likewise.
  350. ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS)
  351.  
  352. # Even if ALLOCA is set, don't use it if compiling with GCC.
  353. USE_ALLOCA= ` case "${CC}" in "${OLDCC}") echo ${ALLOCA} ;; esac `
  354. USE_HOST_ALLOCA= ` case "${HOST_CC}"@"${HOST_ALLOCA}" in "${OLDCC}"@?*) echo ${HOST_PREFIX}${HOST_ALLOCA} ;; esac `
  355. USE_HOST_MALLOC= ` case "${HOST_MALLOC}" in ?*) echo ${HOST_PREFIX}${HOST_MALLOC} ;; esac `
  356. USE_HOST_OBSTACK= ` case "${HOST_OBSTACK}" in ?*) echo ${HOST_PREFIX}${HOST_OBSTACK} ;; esac `
  357.  
  358. # Dependency on obstack, alloca, malloc or whatever library facilities
  359. # are not installed in the system libraries.
  360. # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
  361. LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC) $(COMMON_OBJS)
  362.  
  363. # Likewise, for use in the tools that must run on this machine
  364. # even if we are cross-building GCC.
  365. # We don't use USE_ALLOCA because backquote expansion doesn't work in deps.
  366. HOST_LIBDEPS= $(HOST_PREFIX)$(HOST_OBSTACK) $(HOST_PREFIX)$(HOST_ALLOCA) $(HOST_PREFIX)$(HOST_MALLOC)
  367.  
  368. # How to link with both our special library facilities
  369. # and the system's installed libraries.
  370. LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(CLIB) $(COMMON_OBJS)
  371.  
  372. # Likewise, for use in the tools that must run on this machine
  373. # even if we are cross-building GCC.
  374. HOST_LIBS = $(USE_HOST_OBSTACK) $(USE_HOST_ALLOCA) $(USE_HOST_MALLOC)  \
  375.         $(HOST_CLIB)
  376.  
  377. HOST_RTL = $(HOST_PREFIX)rtl.o
  378. HOST_RTLANAL = $(HOST_PREFIX)rtlanal.o
  379. HOST_PRINT = $(HOST_PREFIX)print-rtl.o
  380.  
  381. # Specify the directories to be searched for header files.
  382. # Both . and srcdir are used, in that order,
  383. # so that tm.h and config.h will be found in the compilation
  384. # subdirectory rather than in the source directory.
  385. INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config
  386. SUBDIR_INCLUDES = -I.. -I../$(srcdir) -I../$(srcdir)/config
  387.  
  388. # Always use -I$(srcdir)/config when compiling.
  389. .c.o:
  390.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $<
  391.  
  392. # This tells GNU make version 3 not to export all the variables
  393. # defined in this file into the environment.
  394. .NOEXPORT:
  395.  
  396. # Lists of files for various purposes.
  397.  
  398. # A list of all the language-specific executables.
  399. COMPILERS = cc1 cc1plus cc1obj cc1objplus
  400.  
  401. # Language-specific object files for C.
  402. C_OBJS = c-parse.o c-lang.o c-lex.o c-pragma.o \
  403.    c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
  404.  
  405. # Language-specific object files for Objective C.
  406. OBJC_OBJS = objc-parse.o objc-act.o c-lex.o c-pragma.o \
  407.    c-decl.o c-typeck.o c-convert.o c-aux-info.o c-common.o c-iterate.o
  408.  
  409. # Language-specific object files for C++.
  410. CPLUS_OBJS = cp-parse.o cp-decl.o cp-decl2.o \
  411.    cp-typeck.o cp-type2.o cp-tree.o cp-ptree.o \
  412.    cp-cvt.o cp-search.o cp-lex.o cp-gc.o cp-call.o \
  413.    cp-class.o cp-init.o cp-method.o cp-except.o \
  414.    cp-expr.o cp-pt.o cp-edsel.o cp-xref.o \
  415.    $(CPLUS_INPUT) cp-spew.o c-common.o cp-error.o cp-errfn.o
  416.  
  417. # Language specific object files for Objective-C++
  418. OBJCPLUS_OBJS = obcp-typeck.o cp-type2.o obcp-tree.o cp-ptree.o \
  419.    obcp-class.o cp-init.o cp-method.o cp-except.o \
  420.    cp-expr.o obcp-pt.o cp-edsel.o cp-xref.o obcp-act.o \
  421.    obcp-parse.o obcp-decl.o obcp-decl2.o \
  422.    cp-cvt.o obcp-search.o obcp-lex.o cp-gc.o cp-call.o \
  423.    $(CPLUS_INPUT) obcp-spew.o c-common.o obcp-error.o cp-errfn.o
  424.  
  425. # Files specific to the C interpreter bytecode compiler(s).
  426. BC_OBJS = bc-emit.o bc-optab.o
  427.  
  428. # Language-independent object files.
  429. OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \
  430.  function.o stmt.o expr.o calls.o expmed.o explow.o optabs.o varasm.o \
  431.  rtl.o print-rtl.o rtlanal.o emit-rtl.o real.o \
  432.  dbxout.o sdbout.o dwarfout.o xcoffout.o \
  433.  integrate.o jump.o cse.o loop.o unroll.o flow.o stupid.o combine.o \
  434.  regclass.o local-alloc.o global.o reload.o reload1.o caller-save.o \
  435.  insn-peep.o reorg.o sched.o final.o recog.o reg-stack.o \
  436.  insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o \
  437.  insn-attrtab.o aux-output.o getpwd.o convert.o $(EXTRA_OBJS)
  438.  
  439. # GEN files are listed separately, so they can be built before doing parallel
  440. #  makes for cc1 or cc1plus.  Otherwise sequent parallel make attempts to load
  441. #  them before rtl.o is compiled.
  442. GEN= genemit genoutput genrecog genextract genflags gencodes genconfig genpeep
  443.  
  444. # Files to be copied away after each stage in building.
  445. STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \
  446.  insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
  447.  insn-attr.h insn-attrtab.c insn-opinit.c \
  448.  stamp-flags stamp-config stamp-codes \
  449.  stamp-output stamp-recog stamp-emit stamp-extract stamp-peep \
  450.  stamp-attr stamp-attrtab stamp-opinit stamp-proto \
  451.  genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
  452.  genattrtab genattr genopinit \
  453.  bc-arity.h bc-opcode.h bc-opname.h \
  454.  stamp-bcarity stamp-bcopcode stamp-bcopname \
  455.  bi-arity bi-opcode bi-opname \
  456.  $(GCC_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) gcc-cross cccp g++ g++-cross \
  457.  cc1plus cc1obj cc1objplus enquire protoize unprotoize \
  458.  specs collect2 $(USE_COLLECT2)
  459.  
  460. # Members of libgcc1.a.
  461. LIB1FUNCS = _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 \
  462.    _lshrsi3 _lshlsi3 _ashrsi3 _ashlsi3 \
  463.    _divdf3 _muldf3 _negdf2 _adddf3 _subdf3 \
  464.    _fixdfsi _fixsfsi _floatsidf _floatsisf _truncdfsf2 _extendsfdf2 \
  465.    _addsf3 _negsf2 _subsf3 _mulsf3 _divsf3 \
  466.    _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 \
  467.    _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2
  468.  
  469. # Library members defined in libgcc2.c.
  470. LIB2FUNCS = _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 \
  471.      _lshrdi3 _lshldi3 _ashldi3 _ashrdi3 _ffsdi2 \
  472.     _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf \
  473.     _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi \
  474.     _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi \
  475.     _fixtfdi _fixunstfdi _floatditf \
  476.     __gcc_bcmp _varargs _eprintf _op_new _new_handler _op_delete \
  477.     _bb _shtab _clear_cache _trampoline __main _exit _ctors
  478.  
  479. # Header files that are made available under the same name
  480. # to programs compiled with GCC.
  481. USER_H = va-alpha.h va-h8300.h va-i860.h va-i960.h va-mips.h va-m88k.h \
  482.     va-pa.h va-pyr.h va-sparc.h va-clipper.h va-spur.h proto.h $(EXTRA_HEADERS)
  483.  
  484. # The files that "belong" in CONFIG_H are deliberately omitted
  485. # because having them there would not be useful in actual practice.
  486. # All they would do is cause complete recompilation every time
  487. # one of the machine description files is edited.
  488. # That may or may not be what one wants to do.
  489. # If it is, rm *.o is an easy way to do it.
  490. # CONFIG_H = config.h tm.h
  491. CONFIG_H =
  492. RTL_H = rtl.h rtl.def machmode.h machmode.def
  493. TREE_H = tree.h real.h tree.def machmode.h machmode.def
  494. CPLUS_TREE_H = $(TREE_H) cp-tree.h cp-tree.def
  495. BYTECODE_H = bytecode.h bc-emit.h bc-optab.h
  496.  
  497. # Avoid a lot of time thinking about remaking Makefile.in and *.def.
  498. .SUFFIXES: .in .def
  499.  
  500. Makefile: $(srcdir)/Makefile.in $(srcdir)/configure $(srcdir)/version.c \
  501.    $(srcdir)/config/$(xmake_file) $(srcdir)/config/$(tmake_file)
  502.     sh config.status
  503.  
  504. all.internal: start.encap rest.encap
  505. # This is what to compile if making a cross-compiler.
  506. # Note that we can compile enquire using the cross-compiler just build,
  507. # although we can't run it on this machine.
  508. all.cross: native gcc-cross g++-cross specs $(LIBGCC) stmp-headers $(STMP_FIXPROTO) $(CROSS_TEST) $(ENQUIRE) $(EXTRA_PARTS)
  509. # This is what to compile if making gcc with a cross-compiler.
  510. all.build: native xgcc g++ $(EXTRA_PARTS)
  511. # This is what must be made before installing GCC and converting libraries.
  512. start.encap: native xgcc g++ specs $(LIBGCC1) xlimits.h
  513. # Use this to make a GCC that will be used only to recompile GCC.
  514. for-bootstrap: start.encap $(LIBGCC)
  515. # These can't be made, with COFF encapsulation, until after GCC can run.
  516. rest.encap: $(LIBGCC) stmp-headers $(STMP_FIXPROTO) $(EXTRA_PARTS)
  517. # This is what is made with the host's compiler
  518. # whether making a cross compiler or not.
  519. native: config.status cpp $(LANGUAGES) $(EXTRA_PASSES) $(EXTRA_PROGRAMS) $(USE_COLLECT2)
  520.  
  521. # Define the names for selecting languages in LANGUAGES.
  522. # Note that it would be nice to move the dependency on g++
  523. # into the C++ rule, but that needs a little bit of work
  524. # to do the right thing within all.cross.
  525. C c: cc1
  526. C++ c++: cc1plus
  527. # The next two ought to depend on objc-runtime, but that doesn't work yet.
  528. OBJC objc: cc1obj
  529. OBJECTIVE-C objective-c: cc1obj
  530. objc++: cc1objplus
  531. objective-c++: cc1objplus
  532. PROTO: proto
  533.  
  534. # Really, really stupid make features, such as SUN's KEEP_STATE, may force
  535. # a target to build even if it is up-to-date.  So we must verify that
  536. # config.status does not exist before failing.
  537. config.status:
  538.     @if [ ! -f config.status ] ; then \
  539.       echo You must configure gcc.  Look at the INSTALL file for details.; \
  540.       false; \
  541.     else \
  542.       true; \
  543.     fi
  544.  
  545. # On the target machine, finish building a cross compiler.
  546. # This does the things that can't be done on the host machine.
  547. rest.cross: $(LIBGCC) gfloat.h specs
  548.  
  549. # Verify that it works to compile and link cross-test.
  550. # If it does, then there are sufficient replacements for libgcc1.a.
  551. cross-test: cross-test.o native gcc-cross $(LIBGCC) $(GCC_PARTS)
  552.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) cross-test.o -o $@
  553. cross-test.o: cross-test.c native gcc-cross
  554.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) -c $(srcdir)/cross-test.c
  555.  
  556. # Recompile all the language-independent object files.
  557. # This is used only if the user explicitly asks for it.
  558. compilations: ${OBJS}
  559.  
  560. # We call this executable `xgcc' rather than `gcc'
  561. # to avoid confusion if the current directory is in the path
  562. # and CC is `gcc'.  It is renamed to `gcc' when it is installed.
  563. xgcc: gcc.o version.o $(LIBDEPS)
  564.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o xgcc gcc.o version.o $(LIBS)
  565.  
  566. # Dump a specs file to make -B./ read these specs over installed ones.
  567. specs: xgcc
  568.     $(GCC_FOR_TARGET) -dumpspecs > specs
  569.  
  570. # Create the compiler driver for g++.
  571. g++: g++.o $(LIBDEPS)
  572.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o g++ g++.o $(LIBS)
  573.  
  574. # We do want to create an executable named `xgcc', so we can use it to
  575. # compile libgcc2.a.
  576. # Also create gcc-cross, so that install-common will install properly.
  577. gcc-cross: xgcc
  578.     cp xgcc gcc-cross
  579.  
  580. # Create a version of the g++ driver which calls the cross-compiler.
  581. g++-cross: $(srcdir)/g++.c
  582.     $(CC) $(ALL_CFLAGS) $(INCLUDES) $(LDFLAGS) -o g++-cross \
  583.        -DGCC_NAME=\"$(target)-gcc\" $(srcdir)/g++.c version.o $(LIBS)
  584.  
  585. cc1: $(P) $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  586.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1 $(C_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
  587.  
  588. cc1plus: $(P) $(CPLUS_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  589.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1plus $(CPLUS_OBJS) $(BC_OBJS) $(OBJS) $(LIBS)
  590.  
  591. cc1obj: $(P) $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  592.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1obj $(OBJC_OBJS) $(OBJS) $(BC_OBJS) $(LIBS)
  593.  
  594. cc1objplus: $(P) $(OBJCPLUS_OBJS) $(OBJS) $(BC_OBJS) $(LIBDEPS)
  595.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cc1objplus $(OBJCPLUS_OBJS) $(BC_OBJS) $(OBJS) $(LIBS)
  596.  
  597. # Copy float.h from its source.
  598. gfloat.h: $(FLOAT_H)
  599.     cp $(FLOAT_H) gfloat.h
  600.  
  601. # Create float.h source for the native machine.
  602. float.h-nat: enquire
  603.     -./enquire -f > tmp-float.h
  604.     mv tmp-float.h float.h-nat
  605.  
  606. # Create a dummy float.h source for a cross-compiler.
  607. float.h-cross:
  608.     echo "#error float.h values not known for cross-compiler" > float.h-cross
  609.  
  610. # Used to compile enquire with standard cc, but have forgotten why.
  611. # Let's try with GCC.
  612. enquire: enquire.o $(GCC_PARTS)
  613.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ENQUIRE_LDFLAGS) enquire.o -o $@
  614. enquire.o: $(srcdir)/enquire.c $(GCC_PASSES)
  615. #    -if [ "$(srcdir)" != "." ]; then rm -f ./enquire.c; else true; fi
  616. #    -cp $(srcdir)/enquire.c . > /dev/null 2>&1
  617. # Breaking this line caused a problem with one version of GNU make.
  618.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(ENQUIRE_CFLAGS) -I. -c $(srcdir)/enquire.c
  619.  
  620. # Build the version of limits.h that we will install.
  621. xlimits.h: glimits.h limitx.h limity.h
  622.     rm -f xlimits.h; \
  623. %if next-headers
  624.     if [ -f $(SYSTEM_HEADER_DIR)/ansi/limits.h ] ; then \
  625. %else next-headers
  626.     if [ -f $(SYSTEM_HEADER_DIR)/limits.h ] ; then \
  627. %endif next-headers
  628.         cat $(srcdir)/limitx.h $(srcdir)/glimits.h \
  629.         $(srcdir)/limity.h > xlimits.h; \
  630.     fi; \
  631.     if [ -f xlimits.h ]; then true; \
  632.     else \
  633.       cat $(srcdir)/glimits.h > xlimits.h; \
  634.     fi
  635.  
  636. # Build libgcc.a.
  637. # This is done in two parts because some functions, in libgcc1.c,
  638. # must be compiled with something other than GCC,
  639. # while the rest, in libgcc2.c, must be compiled with xgcc.
  640. # That means we can't do libgcc2.c until after xgcc, cc1, etc.
  641.  
  642. # Use this as value of LIBGCC1 to cause conversion to GNU library format.
  643. # LIBCONVERT should put its output in libgcc1.conv.
  644. libgcc1.conv: libgcc1.a
  645.     $(LIBCONVERT) libgcc1.a libgcc1.conv
  646.  
  647. # Use this as value of LIBGCC1 to inhibit use of libgcc1.c entirely.
  648. # Make an empty file instead.
  649. libgcc1.null: $(GCC_PASSES)
  650.     echo "__foo () {}" > dummy.c
  651.     $(GCC_FOR_TARGET) -lang-c $(GCC_CFLAGS) -c dummy.c
  652.     $(OLDAR) $(OLDAR_FLAGS) libgcc1.null dummy.o
  653.     rm -f dummy.o dummy.c
  654.  
  655. # This is $(LIBGCC1) for a cross-compiler.
  656. # We have no automatic way of building libgcc1.a, 
  657. # so it's up to the installer to find a way to do that.
  658. # This rule deliberately does not depend on libgcc1.a
  659. # so that it will fail if the installer hasn't provided it.
  660. libgcc1.cross:
  661.     mv libgcc1.a libgcc1.cross || (echo You must find a way to make libgcc1.a; false)
  662.  
  663. # Compile the library of arithmetic subroutines with the native compiler.
  664. # Don't compile it with GCC!
  665. # (That would cause most arithmetic functions to call themselves.)
  666. libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status
  667.     -rm -f tmplibgcc1.a
  668. # Actually build it in tmplibgcc1.a, then rename at end,
  669. # so that libgcc1.a itself remains nonexistent if compilation is aborted.
  670. # -e causes any failing command to make this rule fail.
  671. # -e doesn't work in certain shells, so we test $$? as well.
  672. # lynx has a broken ar, it always complains when the initial library is
  673. # empty, thus this command works only if we don't do -e
  674. # There is a trailing backslash (\) deleted from the following line.
  675. #    set -e;
  676.     for name in $(LIB1FUNCS); \
  677.     do \
  678.       echo $${name}; \
  679.       rm -f $${name}.o; \
  680.       $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c -DL$${name} $(srcdir)/libgcc1.c; \
  681.       if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  682.       mv libgcc1.o $${name}.o; \
  683.       $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}.o; \
  684.       rm -f $${name}.o; \
  685.     done
  686. # Some shells crash when a loop has no items.
  687. # So make sure there is always at least one--`..'.
  688. # Then ignore it.
  689. # We don't use -e here because there are if statements
  690. # that should not make the command give up when the if condition is false.
  691. # Instead, we test for failure after each command where it matters.
  692.     -for file in .. $(LIB1FUNCS_EXTRA); \
  693.     do \
  694.       if [ x$${file} != x.. ]; then \
  695.         name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
  696.         echo $${name}; \
  697.         if [ $${name}.asm = $${file} ]; then \
  698.           cp $${file} $${name}.s || exit 1; file=$${name}.s; \
  699.         else true; fi; \
  700.         $(OLDCC) $(CCLIBFLAGS) $(INCLUDES) -c $${file}; \
  701.         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  702.         $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}.o; \
  703.         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  704.         rm -f $${name}.[so]; \
  705.       else true; \
  706.       fi; \
  707.     done
  708.     mv tmplibgcc1.a libgcc1.a
  709.  
  710. # Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
  711. # But recompiling cc1 should not force recompilation of libgcc2.a.
  712. # If you want to force recompilation, delete libgcc2.a.
  713. libgcc2.ready: $(GCC_PASSES) $(LIBGCC2_DEPS)
  714.     -if [ -f libgcc2.ready ] ; then \
  715.         true; \
  716.     else \
  717.         touch libgcc2.ready; \
  718.     fi
  719.  
  720. libgcc2.a: libgcc2.c libgcc2.ready $(CONFIG_H) $(LIB2FUNCS_EXTRA) \
  721.    machmode.h longlong.h gbl-ctors.h config.status
  722. # Actually build it in tmplibgcc2.a, then rename at end,
  723. # so that libgcc2.a itself remains nonexistent if compilation is aborted.
  724.     -rm -f tmplibgcc2.a
  725. # -e causes any failing command to make this rule fail.
  726. # -e doesn't work in certain shells, so we test $$? as well.
  727. # lynx has a broken ar, it always complains when the initial library is
  728. # empty, thus this command works only if we don't do -e
  729. # There is a trailing backslash (\) deleted from the following line.
  730. #    set -e;
  731.     for name in $(LIB2FUNCS); \
  732.     do \
  733.       echo $${name}; \
  734.       $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
  735.           $(srcdir)/libgcc2.c -o $${name}.o; \
  736.       if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  737.       $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}.o; \
  738.       rm -f $${name}.o; \
  739.     done
  740. # Some shells crash when a loop has no items.
  741. # So make sure there is always at least one--`..'.
  742. # Then ignore it.
  743. # We don't use -e here because there are if statements
  744. # that should not make the command give up when the if condition is false.
  745. # Instead, we test for failure after each command where it matters.
  746.     -for file in .. $(LIB2FUNCS_EXTRA); \
  747.     do \
  748.       if [ x$${file} != x.. ]; then \
  749.         name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
  750.         echo $${name}; \
  751.         if [ $${name}.asm = $${file} ]; then \
  752.           cp $${file} $${name}.s || exit 1; file=$${name}.s; \
  753.         else true; fi; \
  754.         $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
  755.         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  756.         $(AR) $(AR_FLAGS) tmplibgcc2.a $${name}.o; \
  757.         rm -f $${name}.[so]; \
  758.       else true; \
  759.       fi; \
  760.     done
  761.     mv tmplibgcc2.a libgcc2.a
  762. # These lines were deleted from above the mv command
  763. # because ranlibing libgcc.a itself should suffice.
  764. #    -if [ x${HPUX_GAS} = x ] ; then \
  765. #      if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc2.a; else true; fi \
  766. #    else true; fi
  767.  
  768. # Combine the various libraries into a single library, libgcc.a.
  769. libgcc.a: $(LIBGCC1) $(LIBGCC2)
  770.     -rm -rf tmplibgcc.a libgcc.a tmpcopy
  771.     mkdir tmpcopy
  772.     -if [ x$(LIBGCC1) != x ];            \
  773.     then (cd tmpcopy; $(AR) x ../$(LIBGCC1));    \
  774.     else true;                    \
  775.     fi
  776. # Some versions of ar (specifically the one in RISC/os 5.x), create an
  777. # unwritable table of contents file, and then print an error message when
  778. # the second ar command tries to overwrite this file.  To avoid the error
  779. # message from ar, we make sure all files are writable.
  780.     -(cd tmpcopy; chmod +w * > /dev/null 2>&1)
  781.     (cd tmpcopy; $(AR) x ../$(LIBGCC2))
  782.     (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *.o)
  783.     rm -rf tmpcopy
  784.     -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
  785. # Actually build it in tmplibgcc.a, then rename at end,
  786. # so that libgcc.a itself remains nonexistent if compilation is aborted.
  787.     mv tmplibgcc.a libgcc.a
  788.  
  789. objc-runtime: libobjc.a
  790.  
  791. # Build the Objective C runtime library.
  792. libobjc.a: cc1obj libgcc2.ready $(USE_COLLECT2) $(EXTRA_PARTS)
  793.     if [ -d objc ]; then true; else mkdir objc; fi
  794.     thisdir1=`pwd`; \
  795.     srcdir1=`cd $(srcdir); pwd`; \
  796.     cd objc; \
  797.     $(MAKE) -f $${srcdir1}/objc/Makefile libobjc.a \
  798.       srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  799.       GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
  800.       GCC_CFLAGS="$(GCC_CFLAGS)"
  801.     -rm -f libobjc.a
  802.     ln objc/libobjc.a . >/dev/null 2>&1 || cp objc/libobjc.a .
  803.     -if $(RANLIB_TEST) ; then $(RANLIB) libobjc.a; else true; fi
  804.  
  805. # This is used by objc/Makefile if the user runs that directly.
  806. sublibobjc.a: cc1obj libgcc2.ready
  807.     thisdir1=`pwd`; \
  808.     srcdir1=`cd $(srcdir); pwd`; \
  809.     cd objc; \
  810.     $(MAKE) -f $$srcdir1/objc/Makefile libobjc.a \
  811.       srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  812.       GCC_FOR_TARGET="$$thisdir1/xgcc -B$$thisdir1/" \
  813.       GCC_CFLAGS="$(GCC_CFLAGS)"
  814.  
  815. # Compile two additional files that are linked with every program
  816. # linked using GCC on system V, for the sake of C++ constructors.
  817. crtbegin.o:    crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
  818.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) -DCRT_BEGIN \
  819.       -finhibit-size-directive -fno-inline-functions \
  820.       -g0 -c $(srcdir)/crtstuff.c -o crtbegin.o
  821.  
  822. crtend.o:    crtstuff.c $(GCC_PASSES) $(CONFIG_H) gbl-ctors.h
  823.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) -DCRT_END \
  824.       -finhibit-size-directive -fno-inline-functions \
  825.       -g0 -c $(srcdir)/crtstuff.c -o crtend.o
  826.  
  827. # Compiling object files from source files.
  828.  
  829. # Note that dependencies on obstack.h are not written
  830. # because that file is not part of GCC.
  831. # Dependencies on gvarargs.h are not written
  832. # because all that file does, when not compiling with GCC,
  833. # is include the system varargs.h.
  834.  
  835. # C language specific files.
  836.  
  837. c-parse.o : c-parse.c $(CONFIG_H) $(TREE_H) c-lex.h c-parse.h \
  838.     c-tree.h input.h flags.h
  839.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c c-parse.c
  840. c-parse.c c-parse.h: c-parse.y
  841.     -rm -f c-parse.c
  842.     -rm -f c-parse.h
  843.     $(BISON) $(BISONFLAGS) -d c-parse.y -o c-parse.c
  844. c-parse.y: $(srcdir)/c-parse.in
  845.     -rm -f c-parse.y
  846.     sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
  847.       -e "/^ifc$$/d" -e "/^end ifc$$/d" \
  848.       $(srcdir)/c-parse.in > c-parse.y
  849.  
  850. c-decl.o : c-decl.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
  851. c-typeck.o : c-typeck.c $(CONFIG_H) $(TREE_H) c-tree.h flags.h
  852. c-lang.o : c-lang.c $(CONFIG_H) $(TREE_H)
  853. c-lex.o : c-lex.c $(CONFIG_H) $(TREE_H) c-lex.h c-tree.h c-parse.h \
  854.     input.h flags.h
  855. c-aux-info.o : c-aux-info.c  $(CONFIG_H) $(TREE_H) c-tree.h flags.h
  856. c-convert.o : c-convert.c $(CONFIG_H) $(TREE_H) flags.h
  857. c-pragma.o: c-pragma.c $(CONFIG_H) $(TREE_H)
  858. c-iterate.o: c-iterate.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h flags.h
  859.  
  860. # Objective-C++ specific rules
  861.  
  862. obcp-parse.o : obcp-parse.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h cp-lex.h
  863.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  864.   `echo obcp-parse.c | sed 's,^\./,,'`
  865.  
  866. obcp-parse.c obcp-parse.h : obcp-parse.y
  867.     @echo expect 72 shift/reduce conflicts and 19 reduce/reduce conflicts
  868.     -rm -f obcp-parse.c
  869.     -rm -f obcp-parse.h
  870.     $(BISON) $(BISONFLAGS) -d -o obcp-parse.c obcp-parse.y
  871.     grep '^#define[     ]*YYEMPTY' obcp-parse.c >>obcp-parse.h
  872.     grep '^#define[     ]*YYTRANSLATE' obcp-parse.c >>obcp-parse.h
  873.  
  874. obcp-parse.y: $(srcdir)/cp-parse.in
  875.     -rm -f obcp-parse.y
  876.     echo "/* This file is generated from cp-parse.in.  DO NOT EDIT.  */" \
  877.          > obcp-parse.y
  878.     sed -e "/^%ifcplus$$/,/^%endifcplus$$/d" \
  879.       -e '/^%ifobjc$$/d' -e '/^%endifobjc$$/d' \
  880.       $(srcdir)/cp-parse.in >> obcp-parse.y
  881.  
  882. obcp-lex.o: $(srcdir)/cp-lex.c obcp-parse.h obcp-hash.h
  883. obcp-decl.o: $(srcdir)/cp-decl.c
  884. obcp-decl2.o: $(srcdir)/cp-decl2.c
  885. obcp-act.o: $(srcdir)/objc-act.c obcp-parse.h
  886. obcp-typeck.o: $(srcdir)/cp-typeck.c
  887. obcp-tree.o: $(srcdir)/cp-tree.c obcp-parse.h
  888. obcp-class.o: $(srcdir)/cp-class.c
  889. obcp-search.o: $(srcdir)/cp-search.c
  890. obcp-spew.o: $(srcdir)/cp-spew.c obcp-parse.h
  891. obcp-pt.o: $(srcdir)/cp-pt.c
  892.  
  893. # C++ language specific files.
  894.  
  895. cp-parse.o : cp-parse.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h cp-lex.h
  896.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  897.   `echo cp-parse.c | sed 's,^\./,,'`
  898.  
  899. cp-parse.c cp-parse.h : cp-parse.y
  900.     @echo expect 27 shift/reduce conflicts and 14 reduce/reduce conflicts
  901.     -rm -f cp-parse.c cp-parse.h
  902.     $(BISON) $(BISONFLAGS) -d -o cp-parse.c cp-parse.y
  903.     grep '^#define[     ]*YYEMPTY' cp-parse.c >>cp-parse.h
  904.     grep '^#define[     ]*YYTRANSLATE' cp-parse.c >>cp-parse.h
  905.  
  906. cp-parse.y: $(srcdir)/cp-parse.in
  907.     -rm -f cp-parse.y
  908.     echo "/* This file is generated from cp-parse.in.  DO NOT EDIT.  */" \
  909.          > cp-parse.y  
  910.     sed -e "/^%ifobjc$$/,/^%endifobjc$$/d" \
  911.       -e '/^%ifcplus$$/d' -e '/^%endifcplus$$/d' \
  912.       $(srcdir)/cp-parse.in >> cp-parse.y
  913.  
  914. cp-spew.o : cp-spew.c $(CONFIG_H) $(CPLUS_TREE_H) \
  915.    cp-parse.h flags.h cp-lex.h
  916. cp-lex.o : cp-lex.c $(CONFIG_H) $(CPLUS_TREE_H) \
  917.    cp-parse.h $(srcdir)/cp-input.c flags.h cp-hash.h cp-lex.h
  918. cp-decl.o : cp-decl.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
  919.   cp-lex.h cp-decl.h stack.h
  920. cp-decl2.o : cp-decl2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
  921.   cp-lex.h cp-decl.h
  922. cp-type2.o : cp-type2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  923. cp-typeck.o : cp-typeck.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h $(RTL_H)
  924. cp-class.o : cp-class.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  925. cp-call.o : cp-call.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  926. cp-init.o : cp-init.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h $(RTL_H)
  927. cp-method.o : cp-method.c $(CONFIG_H) $(CPLUS_TREE_H)
  928. cp-cvt.o : cp-cvt.c $(CONFIG_H) $(CPLUS_TREE_H)
  929. cp-search.o : cp-search.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
  930. cp-tree.o : cp-tree.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  931. cp-ptree.o : cp-ptree.c $(CONFIG_H) $(CPLUS_TREE_H)
  932. cp-gc.o : cp-gc.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  933. cp-except.o : cp-except.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h $(RTL_H)
  934. cp-expr.o : cp-expr.c $(CONFIG_H) $(CPLUS_TREE_H) $(RTL_H) flags.h \
  935.   expr.h insn-codes.h
  936. cp-edsel.o : cp-edsel.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h flags.h
  937. cp-xref.o : cp-xref.c $(CONFIG_H) $(CPLUS_TREE_H) input.h
  938. cp-pt.o : cp-pt.c $(CONFIG_H) $(CPLUS_TREE_H) cp-decl.h cp-parse.h
  939. cp-error.o : cp-error.c $(CONFIG_H) $(CPLUS_TREE_H)
  940. cp-errfn.o : cp-errfn.c $(CONFIG_H) $(CPLUS_TREE_H)
  941.  
  942. g++.o : g++.c $(CONFIG_H) gvarargs.h
  943.  
  944. # To make a configuration always use collect2, set USE_COLLECT2 to ld.
  945. ld: collect2
  946.     rm -f ld
  947.     ln collect2 ld
  948.  
  949. collect2 : collect2.o version.o $(LIBDEPS)
  950. # Don't try modifying collect2 (aka ld) in place--it might be linking this.
  951.     -rm -f collect2
  952.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o collect2 collect2.o version.o $(LIBS)
  953.  
  954. collect2.o : collect2.c $(CONFIG_H) gstab.h
  955.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES)  \
  956.     -DTARGET_MACHINE=\"$(target)\" \
  957.     -c `echo $(srcdir)/collect2.c | sed 's,^\./,,'`
  958.  
  959. # Objective C language specific files.
  960.  
  961. objc-parse.o : objc-parse.c $(CONFIG_H) $(TREE_H) c-lex.h \
  962.    c-tree.h input.h flags.h objc-act.h
  963.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c objc-parse.c
  964. objc-parse.c objc-parse.h : objc-parse.y
  965.     -rm -f objc-parse.c objc-parse.h
  966.     $(BISON) $(BISONFLAGS) -d objc-parse.y -o objc-parse.c
  967. objc-parse.y: $(srcdir)/c-parse.in
  968.     -rm -f  objc-parse.y
  969.     echo "/* This file is generated from c-parse.in.  DO NOT EDIT.  */" \
  970.          > objc-parse.y
  971.     sed -e "/^ifc$$/,/^end ifc$$/d" \
  972.       -e "/^ifobjc$$/d" -e "/^end ifobjc$$/d" \
  973.       $(srcdir)/c-parse.in >> objc-parse.y
  974.  
  975. objc-act.o : objc-act.c $(CONFIG_H) $(TREE_H) $(RTL_H) c-tree.h c-lex.h \
  976.    flags.h objc-act.h input.h function.h objc-parse.h
  977.  
  978. # A file used by all variants of C.
  979.  
  980. c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h
  981.  
  982. # Language-independent files.
  983.  
  984. gcc.o: gcc.c $(CONFIG_H) gvarargs.h config.status
  985.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  986.   -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
  987.   -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
  988.   -DDEFAULT_TARGET_MACHINE=\"$(target)\" \
  989.   -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\" \
  990.   -DTOOLDIR=\"$(tooldir)/\" \
  991.   $(MAYBE_TARGET_DEFAULT) \
  992.   -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'`
  993.  
  994. dumpvers: dumpvers.c
  995.  
  996. version.o: version.c
  997. obstack.o: obstack.c
  998.  
  999. convert.o: convert.c $(CONFIG_H) $(TREE_H) flags.h convert.h
  1000.  
  1001. tree.o : tree.c $(CONFIG_H) $(TREE_H) gvarargs.h flags.h function.h
  1002. print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
  1003. stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) function.h
  1004. fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H) flags.h 
  1005. toplev.o : toplev.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h input.h \
  1006.    insn-attr.h xcoffout.h defaults.h insn-flags.h
  1007.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1008.       $(MAYBE_TARGET_DEFAULT) $(MAYBE_USE_COLLECT2) \
  1009.       -c `echo $(srcdir)/toplev.c | sed 's,^\./,,'`
  1010.  
  1011. rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
  1012.  
  1013. print-rtl.o : print-rtl.c $(CONFIG_H) $(RTL_H)
  1014. rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
  1015.  
  1016. toplev.o: bytecode.h bc-emit.h 
  1017. varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h function.h \
  1018.    defaults.h insn-codes.h expr.h hard-reg-set.h regs.h xcoffout.h bytecode.h
  1019. function.o : function.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  1020.    insn-flags.h insn-codes.h expr.h regs.h hard-reg-set.h insn-config.h \
  1021.    recog.h output.h bytecode.h
  1022. stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  1023.    insn-flags.h insn-config.h insn-codes.h hard-reg-set.h expr.h loop.h \
  1024.    recog.h bytecode.h bc-typecd.h bc-typecd.def bc-opcode.h bc-optab.h \
  1025.    bc-emit.h
  1026. expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h function.h  \
  1027.    insn-flags.h insn-codes.h expr.h insn-config.h recog.h output.h \
  1028.    typeclass.h bytecode.h bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h \
  1029.    bc-emit.h modemap.def
  1030. calls.o : calls.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h \
  1031.    insn-flags.h gvarargs.h 
  1032. expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  1033.    insn-flags.h insn-config.h insn-codes.h expr.h recog.h real.h
  1034. explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h hard-reg-set.h \
  1035.    insn-config.h expr.h recog.h insn-flags.h insn-codes.h
  1036. optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  1037.    insn-flags.h insn-config.h insn-codes.h expr.h recog.h reload.h
  1038. dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h regs.h \
  1039.    insn-config.h reload.h gstab.h xcoffout.h defaults.h output.h
  1040. sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H) gsyms.h flags.h \
  1041.    insn-config.h reload.h
  1042. dwarfout.o : dwarfout.c $(CONFIG_H) $(TREE_H) $(RTL_H) dwarf.h flags.h \
  1043.    insn-config.h reload.h output.h defaults.h
  1044. xcoffout.o : xcoffout.c $(CONFIG_H) $(TREE_H) $(RTL_H) xcoffout.h flags.h
  1045. emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h gvarargs.h \
  1046.    function.h regs.h insn-config.h insn-codes.h real.h expr.h bytecode.h \
  1047.    bc-opcode.h bc-typecd.h bc-typecd.def bc-optab.h bc-emit.h bc-opname.h
  1048. real.o : real.c $(CONFIG_H) $(TREE_H)
  1049. getpwd.o : getpwd.c $(CONFIG_H)
  1050.  
  1051. integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h integrate.h \
  1052.    insn-flags.h insn-config.h insn-codes.h expr.h real.h function.h \
  1053.    bytecode.h
  1054.  
  1055. jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h hard-reg-set.h regs.h \
  1056.    insn-config.h insn-flags.h insn-codes.h expr.h real.h
  1057. stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h
  1058.  
  1059. cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h \
  1060.    insn-config.h recog.h
  1061. loop.o : loop.c $(CONFIG_H) $(RTL_H) flags.h loop.h insn-config.h \
  1062.    insn-flags.h insn-codes.h regs.h hard-reg-set.h recog.h expr.h real.h
  1063. unroll.o : unroll.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
  1064.    integrate.h regs.h flags.h expr.h loop.h
  1065. flow.o : flow.c $(CONFIG_H) $(RTL_H) flags.h insn-config.h \
  1066.    basic-block.h regs.h hard-reg-set.h output.h
  1067. combine.o : combine.c $(CONFIG_H) $(RTL_H) gvarargs.h flags.h  \
  1068.    insn-config.h insn-flags.h insn-codes.h insn-attr.h regs.h expr.h \
  1069.    basic-block.h recog.h real.h hard-reg-set.h
  1070. regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
  1071.    basic-block.h regs.h insn-config.h recog.h reload.h real.h bytecode.h
  1072. local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h basic-block.h \
  1073.    regs.h hard-reg-set.h insn-config.h recog.h output.h insn-flags.h
  1074. global.o : global.c $(CONFIG_H) $(RTL_H) flags.h  \
  1075.    basic-block.h regs.h hard-reg-set.h insn-config.h output.h
  1076.  
  1077. reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h \
  1078.    reload.h recog.h hard-reg-set.h insn-config.h insn-codes.h regs.h real.h
  1079. reload1.o : reload1.c $(CONFIG_H) $(RTL_H) flags.h expr.h \
  1080.    reload.h regs.h hard-reg-set.h insn-config.h insn-flags.h insn-codes.h \
  1081.    basic-block.h recog.h output.h
  1082. caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
  1083.    regs.h hard-reg-set.h insn-config.h basic-block.h recog.h reload.h expr.h
  1084. reorg.o : reorg.c $(CONFIG_H) $(RTL_H) conditions.h hard-reg-set.h \
  1085.    basic-block.h regs.h insn-config.h insn-attr.h insn-flags.h recog.h \
  1086.    flags.h output.h
  1087. sched.o : sched.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h \
  1088.    flags.h insn-config.h insn-attr.h
  1089. final.o : final.c $(CONFIG_H) $(RTL_H) $(TREE_H) gvarargs.h flags.h regs.h \
  1090.    recog.h conditions.h insn-config.h insn-attr.h real.h output.h \
  1091.    hard-reg-set.h insn-flags.h insn-codes.h gstab.h xcoffout.h defaults.h
  1092. recog.o : recog.c $(CONFIG_H) $(RTL_H)  \
  1093.    regs.h recog.h hard-reg-set.h flags.h insn-config.h insn-attr.h \
  1094.    insn-flags.h insn-codes.h real.h
  1095. reg-stack.o : reg-stack.c $(CONFIG_H) $(RTL_H) $(TREE_H) \
  1096.    regs.h hard-reg-set.h flags.h insn-config.h
  1097.  
  1098. aux-output.o : aux-output.c $(CONFIG_H) \
  1099.    $(RTL_H) regs.h hard-reg-set.h real.h insn-config.h conditions.h \
  1100.    insn-flags.h output.h insn-attr.h insn-codes.h
  1101.  
  1102. # Build auxiliary files that support ecoff format.
  1103. mips-tfile: mips-tfile.o version.o $(LIBDEPS)
  1104.     $(CC) $(CFLAGS) $(LDFLAGS) -o mips-tfile mips-tfile.o version.o $(LIBS)
  1105.  
  1106. mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H)
  1107.  
  1108. mips-tdump: mips-tdump.o version.o $(LIBDEPS)
  1109.     $(CC) $(CFLAGS) $(LDFLAGS) -o mips-tdump mips-tdump.o version.o $(LIBS)
  1110.  
  1111. mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H)
  1112.  
  1113. # Normally this target is not used; but it is used if you
  1114. # define ALLOCA=alloca.o.  In that case, you must get a suitable alloca.c
  1115. # from the GNU Emacs distribution.
  1116. alloca.o:    alloca.c
  1117.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(ALLOCA_FLAGS) \
  1118.       -c `echo $(srcdir)/alloca.c | sed 's,^\./,,'`
  1119.     $(ALLOCA_FINISH)
  1120.  
  1121. # Generate header and source files from the machine description, 
  1122. # and compile them.
  1123.  
  1124. .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
  1125.   insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c \
  1126.   insn-attr.h insn-attrtab.c
  1127.  
  1128. # The following pair of rules has this effect:
  1129. # genconfig is run only if the md has changed since genconfig was last run;
  1130. # but the file insn-config.h is touched only when its contents actually change.
  1131.  
  1132. # Each of the other insn-* files is handled by a similar pair of rules.
  1133.  
  1134. # This causes an anomaly in the results of make -n
  1135. # because insn-* is older than stamp-*
  1136. # and thus make -n thinks that insn-* will be updated
  1137. # and force recompilation of things that depend on it.
  1138. # We use move-if-change precisely to avoid such recompilation.
  1139. # But there is no way to teach make -n that it will be avoided.
  1140.  
  1141. # Each of the insn-*.[ch] rules has a semicolon at the end,
  1142. # for otherwise the system Make on SunOS 4.1 never tries
  1143. # to recompile insn-*.o.  To avoid problems and extra noise from
  1144. # versions of make which don't like empty commands (nothing after the
  1145. # trailing `;'), we call true for each.
  1146.  
  1147. insn-config.h: stamp-config ; @true
  1148. stamp-config : md genconfig $(srcdir)/move-if-change
  1149.     ./genconfig md > tmp-config.h
  1150.     $(srcdir)/move-if-change tmp-config.h insn-config.h
  1151.     touch stamp-config
  1152.  
  1153. insn-flags.h: stamp-flags ; @true
  1154. stamp-flags : md genflags $(srcdir)/move-if-change
  1155.     ./genflags md > tmp-flags.h
  1156.     $(srcdir)/move-if-change tmp-flags.h insn-flags.h
  1157.     touch stamp-flags
  1158.  
  1159. insn-codes.h: stamp-codes ; @true
  1160. stamp-codes : md gencodes $(srcdir)/move-if-change
  1161.     ./gencodes md > tmp-codes.h
  1162.     $(srcdir)/move-if-change tmp-codes.h insn-codes.h
  1163.     touch stamp-codes
  1164.  
  1165. insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h output.h \
  1166.   insn-config.h insn-flags.h insn-codes.h
  1167.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
  1168.  
  1169. insn-emit.c: stamp-emit ; @true
  1170. stamp-emit : md genemit $(srcdir)/move-if-change
  1171.     ./genemit md > tmp-emit.c
  1172.     $(srcdir)/move-if-change tmp-emit.c insn-emit.c
  1173.     touch stamp-emit
  1174.  
  1175. insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h recog.h \
  1176.   real.h output.h flags.h
  1177.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-recog.c
  1178.  
  1179. insn-recog.c: stamp-recog ; @true
  1180. stamp-recog : md genrecog $(srcdir)/move-if-change
  1181.     ./genrecog md > tmp-recog.c
  1182.     $(srcdir)/move-if-change tmp-recog.c insn-recog.c
  1183.     touch stamp-recog
  1184.  
  1185. insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) insn-codes.h insn-flags.h \
  1186.   insn-config.h flags.h rtl.h recog.h expr.h reload.h
  1187.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-opinit.c
  1188.  
  1189. insn-opinit.c: stamp-opinit ; @true
  1190. stamp-opinit : md genopinit $(srcdir)/move-if-change
  1191.     ./genopinit md > tmp-opinit.c
  1192.     $(srcdir)/move-if-change tmp-opinit.c insn-opinit.c
  1193.     touch stamp-opinit
  1194.  
  1195. insn-extract.o : insn-extract.c $(CONFIG_H) $(RTL_H)
  1196.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-extract.c
  1197.  
  1198. insn-extract.c: stamp-extract ; @true
  1199. stamp-extract : md genextract $(srcdir)/move-if-change
  1200.     ./genextract md > tmp-extract.c
  1201.     $(srcdir)/move-if-change tmp-extract.c insn-extract.c
  1202.     touch stamp-extract
  1203.  
  1204. insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h output.h real.h
  1205.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-peep.c
  1206.  
  1207. insn-peep.c: stamp-peep ; @true
  1208. stamp-peep : md genpeep $(srcdir)/move-if-change
  1209.     ./genpeep md > tmp-peep.c
  1210.     $(srcdir)/move-if-change tmp-peep.c insn-peep.c
  1211.     touch stamp-peep
  1212.  
  1213. insn-attrtab.o : insn-attrtab.c $(CONFIG_H) $(RTL_H) regs.h real.h output.h \
  1214.      insn-attr.h insn-config.h
  1215.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-attrtab.c
  1216.  
  1217. insn-attr.h: stamp-attr ; @true
  1218. stamp-attr : md genattr $(srcdir)/move-if-change
  1219.     ./genattr md > tmp-attr.h
  1220.     $(srcdir)/move-if-change tmp-attr.h insn-attr.h
  1221.     touch stamp-attr
  1222.  
  1223. insn-attrtab.c: stamp-attrtab ; @true
  1224. stamp-attrtab : md genattrtab $(srcdir)/move-if-change
  1225.     if cmp -s $(PREMADE_ATTRTAB_MD) md;    \
  1226.     then                    \
  1227.       echo Using $(PREMADE_ATTRTAB);    \
  1228.       cp $(PREMADE_ATTRTAB) tmp-attrtab.c;    \
  1229.     else                    \
  1230.       ./genattrtab md > tmp-attrtab.c;    \
  1231.     fi
  1232.     $(srcdir)/move-if-change tmp-attrtab.c insn-attrtab.c
  1233.     touch stamp-attrtab
  1234.  
  1235. insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \
  1236.     hard-reg-set.h insn-config.h insn-flags.h insn-attr.h output.h recog.h \
  1237.     insn-codes.h
  1238.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-output.c
  1239.  
  1240. insn-output.c: stamp-output ; @true
  1241. stamp-output : md genoutput $(srcdir)/move-if-change
  1242.     ./genoutput md > tmp-output.c
  1243.     $(srcdir)/move-if-change tmp-output.c insn-output.c
  1244.     touch stamp-output
  1245.  
  1246. # Compile the programs that generate insn-* from the machine description.
  1247. # They are compiled with $(HOST_CC), and associated libraries,
  1248. # since they need to run on this machine
  1249. # even if GCC is being compiled to run on some other machine.
  1250.  
  1251. # $(CONFIG_H) is omitted from the deps of the gen*.o
  1252. # because these programs don't really depend on anything 
  1253. # about the target machine.  They do depend on config.h itself,
  1254. # since that describes the host machine.
  1255.  
  1256. # Pass the md file through cpp if the target requests it.
  1257. $(MD_FILE): $(CPP_MD)
  1258.     -if [ -f md.pre-cpp ]; then \
  1259.       rm -f md ; ./cpp $(CPP_MD_FLAGS) md.pre-cpp | sed 's/^# /; /g' > md ; \
  1260.     else true ; \
  1261.     fi
  1262.  
  1263. genconfig : $(HOST_PREFIX)genconfig.o $(HOST_RTL) $(HOST_LIBDEPS)
  1264.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genconfig \
  1265.       $(HOST_PREFIX)genconfig.o $(HOST_RTL) $(HOST_LIBS)
  1266.  
  1267. $(HOST_PREFIX)genconfig.o : genconfig.c $(RTL_H) hconfig.h
  1268.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genconfig.c -o $@
  1269.  
  1270. genflags : $(HOST_PREFIX)genflags.o $(HOST_RTL) $(HOST_LIBDEPS)
  1271.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genflags \
  1272.      $(HOST_PREFIX)genflags.o $(HOST_RTL) $(HOST_LIBS)
  1273.  
  1274. $(HOST_PREFIX)genflags.o : genflags.c $(RTL_H) hconfig.h
  1275.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genflags.c -o $@
  1276.  
  1277. gencodes : $(HOST_PREFIX)gencodes.o $(HOST_RTL) $(HOST_LIBDEPS)
  1278.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o gencodes \
  1279.      $(HOST_PREFIX)gencodes.o $(HOST_RTL) $(HOST_LIBS)
  1280.  
  1281. $(HOST_PREFIX)gencodes.o : gencodes.c $(RTL_H) hconfig.h
  1282.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gencodes.c -o $@
  1283.  
  1284. genemit : $(HOST_PREFIX)genemit.o $(HOST_RTL) $(HOST_LIBDEPS)
  1285.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genemit \
  1286.      $(HOST_PREFIX)genemit.o $(HOST_RTL) $(HOST_LIBS)
  1287.  
  1288. $(HOST_PREFIX)genemit.o : genemit.c $(RTL_H) hconfig.h
  1289.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genemit.c -o $@
  1290.  
  1291. genopinit : $(HOST_PREFIX)genopinit.o $(HOST_RTL) $(HOST_LIBDEPS)
  1292.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genopinit \
  1293.      $(HOST_PREFIX)genopinit.o $(HOST_RTL) $(HOST_LIBS)
  1294.  
  1295. $(HOST_PREFIX)genopinit.o : genopinit.c $(RTL_H) hconfig.h
  1296.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genopinit.c -o $@
  1297.  
  1298. genrecog : $(HOST_PREFIX)genrecog.o $(HOST_RTL) $(HOST_LIBDEPS)
  1299.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genrecog \
  1300.      $(HOST_PREFIX)genrecog.o $(HOST_RTL) $(HOST_LIBS)
  1301.  
  1302. $(HOST_PREFIX)genrecog.o : genrecog.c $(RTL_H) hconfig.h
  1303.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genrecog.c -o $@
  1304.  
  1305. genextract : $(HOST_PREFIX)genextract.o $(HOST_RTL) $(HOST_LIBDEPS)
  1306.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genextract \
  1307.      $(HOST_PREFIX)genextract.o $(HOST_RTL) $(HOST_LIBS)
  1308.  
  1309. $(HOST_PREFIX)genextract.o : genextract.c $(RTL_H) hconfig.h insn-config.h
  1310.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genextract.c -o $@
  1311.  
  1312. genpeep : $(HOST_PREFIX)genpeep.o $(HOST_RTL) $(HOST_LIBDEPS)
  1313.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genpeep \
  1314.      $(HOST_PREFIX)genpeep.o $(HOST_RTL) $(HOST_LIBS)
  1315.  
  1316. $(HOST_PREFIX)genpeep.o : genpeep.c $(RTL_H) hconfig.h
  1317.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genpeep.c -o $@
  1318.  
  1319. genattr : $(HOST_PREFIX)genattr.o $(HOST_RTL) $(HOST_LIBDEPS)
  1320.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genattr \
  1321.      $(HOST_PREFIX)genattr.o $(HOST_RTL) $(HOST_LIBS)
  1322.  
  1323. $(HOST_PREFIX)genattr.o : genattr.c $(RTL_H) hconfig.h
  1324.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattr.c -o $@
  1325.  
  1326. genattrtab : $(HOST_PREFIX)genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBDEPS)
  1327.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genattrtab \
  1328.      $(HOST_PREFIX)genattrtab.o $(HOST_RTL) $(HOST_PRINT) $(HOST_RTLANAL) $(HOST_LIBS)
  1329.  
  1330. $(HOST_PREFIX)genattrtab.o : genattrtab.c $(RTL_H) hconfig.h insn-config.h
  1331.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genattrtab.c -o $@
  1332.  
  1333. genoutput : $(HOST_PREFIX)genoutput.o $(HOST_RTL) $(HOST_LIBDEPS)
  1334.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o genoutput \
  1335.      $(HOST_PREFIX)genoutput.o $(HOST_RTL) $(HOST_LIBS)
  1336.  
  1337. $(HOST_PREFIX)genoutput.o : genoutput.c $(RTL_H) hconfig.h
  1338.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/genoutput.c -o $@
  1339.  
  1340. # Compile the libraries to be used by gen*.
  1341. # If we are not cross-building, gen* use the same .o's that cc1 will use,
  1342. # and HOST_PREFIX_1 is `foobar', just to ensure these rules don't conflict
  1343. # with the rules for rtl.o, alloca.o, etc.
  1344. $(HOST_PREFIX_1)rtl.o: $(srcdir)/rtl.c $(CONFIG_H) $(RTL_H)
  1345.     rm -f $(HOST_PREFIX)rtl.c
  1346.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtl.c > $(HOST_PREFIX)rtl.c
  1347.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtl.c
  1348.  
  1349. $(HOST_PREFIX_1)print-rtl.o: $(srcdir)/print-rtl.c $(CONFIG_H) $(RTL_H)
  1350.     rm -f $(HOST_PREFIX)print-rtl.c
  1351.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/print-rtl.c > $(HOST_PREFIX)print-rtl.c
  1352.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)print-rtl.c
  1353.  
  1354. $(HOST_PREFIX_1)rtlanal.o: $(srcdir)/rtlanal.c $(CONFIG_H) $(RTL_H)
  1355.     rm -f $(HOST_PREFIX)rtlanal.c
  1356.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/rtlanal.c > $(HOST_PREFIX)rtlanal.c
  1357.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)rtlanal.c
  1358.  
  1359. $(HOST_PREFIX_1)alloca.o: alloca.c
  1360.     rm -f $(HOST_PREFIX)alloca.c
  1361.     cp $(srcdir)/alloca.c $(HOST_PREFIX)alloca.c
  1362.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)alloca.c
  1363.  
  1364. $(HOST_PREFIX_1)obstack.o: obstack.c
  1365.     rm -f $(HOST_PREFIX)obstack.c
  1366.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/obstack.c > $(HOST_PREFIX)obstack.c
  1367.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)obstack.c
  1368.  
  1369. $(HOST_PREFIX_1)malloc.o: malloc.c
  1370.     rm -f $(HOST_PREFIX)malloc.c
  1371.     sed -e 's/config[.]h/hconfig.h/' $(srcdir)/malloc.c > $(HOST_PREFIX)malloc.c
  1372.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(HOST_PREFIX)malloc.c
  1373.  
  1374. # This satisfies the dependency that we get if you cross-compile a compiler
  1375. # that does not need to compile alloca, malloc or whatever.
  1376. $(HOST_PREFIX_1): 
  1377.     touch $(HOST_PREFIX_1)
  1378.  
  1379. # Remake bytecode files.
  1380. # BI_ALL=$(HOST_PREFIX)bi-run.o
  1381. BI_ALL=
  1382. BC_ALL=bc-opname.h bc-opcode.h bc-arity.h
  1383. BI_OBJ=$(HOST_PREFIX)bi-parser.o $(HOST_PREFIX)bi-lexer.o $(HOST_PREFIX)bi-reverse.o
  1384.  
  1385.  
  1386. bc-emit.o : bc-emit.c $(CONFIG_H) $(RTL_H) real.h $(BYTECODE_H) \
  1387.      bc-arity.h bc-opcode.h bc-typecd.h bc-typecd.def bi-run.h bytetypes.h
  1388. bc-optab.o : bc-optab.c $(CONFIG_H) $(REAL_H) $(BYTECODE_H) \
  1389.         bc-opcode.h bc-typecd.h bc-typecd.def
  1390.  
  1391.  
  1392. bytecode: $(BI_ALL) $(BC_ALL)
  1393.  
  1394. bi-arity: $(HOST_PREFIX)bi-arity.o $(BI_OBJ) $(HOST_LIBDEPS)
  1395.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-arity \
  1396.      $(HOST_PREFIX)bi-arity.o $(BI_OBJ) $(HOST_LIBS)
  1397. bi-opcode: $(HOST_PREFIX)bi-opcode.o $(BI_OBJ) $(HOST_LIBDEPS)
  1398.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-opcode \
  1399.      $(HOST_PREFIX)bi-opcode.o $(BI_OBJ) $(HOST_LIBS)
  1400. bi-opname: $(HOST_PREFIX)bi-opname.o $(BI_OBJ) $(HOST_LIBDEPS)
  1401.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o bi-opname \
  1402.      $(HOST_PREFIX)bi-opname.o $(BI_OBJ) $(HOST_LIBS)
  1403.  
  1404. $(HOST_PREFIX)bi-run.o:    $(srcdir)/bi-run.c $(srcdir)/bi-run.h $(srcdir)/bc-typecd.h \
  1405.   bc-opname.h bc-arity.h bc-opcode.h
  1406.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1407.          -c $(srcdir)/bi-run.c -o $@
  1408. $(srcdir)/bi-parser.c $(srcdir)/bi-parser.h: $(srcdir)/bi-parser.y
  1409.     -rm -f $(srcdir)/bi-parser.c
  1410.     -rm -f $(srcdir)/bi-parser.h
  1411.     cd $(srcdir); $(BISON) $(BISONFLAGS) -d bi-parser.y -o bi-parser.c
  1412. $(HOST_PREFIX)bi-parser.o:    $(srcdir)/bi-parser.c $(srcdir)/bi-defs.h hconfig.h
  1413.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1414.        $(srcdir)/bi-parser.c -o $@
  1415. $(HOST_PREFIX)bi-lexer.o:    $(srcdir)/bi-lexer.c $(srcdir)/bi-parser.h hconfig.h
  1416.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1417.        $(srcdir)/bi-lexer.c -o $@
  1418. $(HOST_PREFIX)bi-arity.o: bi-arity.c $(srcdir)/bi-defs.h hconfig.h
  1419.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1420.        $(srcdir)/bi-arity.c -o $@
  1421. $(HOST_PREFIX)bi-opcode.o: bi-opcode.c $(srcdir)/bi-defs.h hconfig.h
  1422.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1423.        $(srcdir)/bi-opcode.c -o $@
  1424. $(HOST_PREFIX)bi-opname.o: bi-opname.c $(srcdir)/bi-defs.h hconfig.h
  1425.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1426.        $(srcdir)/bi-opname.c -o $@
  1427. $(HOST_PREFIX)bi-reverse.o: bi-reverse.c $(srcdir)/bi-defs.h
  1428.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) \
  1429.        $(srcdir)/bi-reverse.c -o $@
  1430.  
  1431.  
  1432. bc-arity.h: stamp-bcarity ; @true
  1433. stamp-bcarity : $(srcdir)/bytecode.def bi-arity $(srcdir)/move-if-change
  1434.     ./bi-arity < $(srcdir)/bytecode.def >tmp-bc-arity.h
  1435.     $(srcdir)/move-if-change tmp-bc-arity.h bc-arity.h
  1436.     touch stamp-bcarity
  1437.  
  1438. bc-opcode.h: stamp-bcopcode ; @true
  1439. stamp-bcopcode : $(srcdir)/bytecode.def bi-opcode $(srcdir)/move-if-change
  1440.     ./bi-opcode < $(srcdir)/bytecode.def >tmp-bcopcd.h
  1441.     $(srcdir)/move-if-change tmp-bcopcd.h bc-opcode.h
  1442.     touch stamp-bcopcode
  1443.  
  1444. bc-opname.h: stamp-bcopname ; @true
  1445. stamp-bcopname : $(srcdir)/bytecode.def bi-opname $(srcdir)/move-if-change
  1446.     ./bi-opname < $(srcdir)/bytecode.def >tmp-bcopnm.h
  1447.     $(srcdir)/move-if-change tmp-bcopnm.h bc-opname.h
  1448.     touch stamp-bcopname
  1449.  
  1450. bytecode.mostlyclean:
  1451.     -rm -f bc-arity.h bc-opcode.h bc-opname.h
  1452.  
  1453. bytecode.distclean bytecode.clean:    bytecode.mostlyclean
  1454.     -rm -f bi-arity bi-opcode bi-opname bi-lexer
  1455.  
  1456. bytecode.realclean: bytecode.clean
  1457.     -rm -f bi-parser.c bi-parser.h
  1458.  
  1459.  
  1460. # Remake cpp and protoize.
  1461.  
  1462. # Making the preprocessor
  1463. cpp: cccp
  1464.     -rm -f cpp
  1465.     ln cccp cpp
  1466. cccp: cccp.o cexp.o version.o $(LIBDEPS)
  1467.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS)
  1468. cexp.o: $(srcdir)/cexp.c $(CONFIG_H)
  1469.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c $(srcdir)/cexp.c
  1470. $(srcdir)/cexp.c: $(srcdir)/cexp.y
  1471.     cd $(srcdir); $(BISON) -o cexp.c cexp.y
  1472. cccp.o: cccp.c $(CONFIG_H) pcp.h version.c config.status
  1473. # The reason we use $(libdir)/g++-include rather than using libsubdir
  1474. # is for compatibility with the current version of libg++.
  1475.     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1476.       -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  1477.       -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
  1478.       -DLOCAL_INCLUDE_DIR=\"$(local_prefix)/include\" \
  1479.       -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
  1480.       -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
  1481.       -DTOOLDIR=\"$(tooldir)/\" \
  1482.       -c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
  1483.  
  1484. # Note for the stamp targets, we run the program `true' instead of
  1485. # having an empty command (nothing following the semicolon).
  1486.  
  1487. proto: config.status protoize unprotoize SYSCALLS.c.X
  1488.  
  1489. protoize: protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS)
  1490.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) \
  1491.       protoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS) -o $@
  1492. protoize.o: stamp-proto ; @true
  1493.  
  1494. unprotoize: unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBDEPS)
  1495.     $(CC) $(ALL_CFLAGS) $(LDFLAGS) \
  1496.       unprotoize.o getopt.o getopt1.o getpwd.o version.o $(LIBS) -o $@
  1497. unprotoize.o:    stamp-proto ; @true
  1498.  
  1499. stamp-proto:    $(srcdir)/protoize.c getopt.h $(CONFIG_H)
  1500.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1501.           -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  1502.           -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
  1503.           -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
  1504.       -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
  1505.       -DLOCAL_INCLUDE_DIR=\"$(local_prefix)/include\" \
  1506.       -DSTD_PROTO_DIR=\"$(libsubdir)\" \
  1507.       -DUNPROTOIZE $(srcdir)/protoize.c
  1508.     mv protoize.o unprotoize.o
  1509.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1510.           -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
  1511.           -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" \
  1512.           -DCROSS_INCLUDE_DIR=\"$(libsubdir)/sys-include\" \
  1513.       -DTOOL_INCLUDE_DIR=\"$(tooldir)/include\" \
  1514.       -DLOCAL_INCLUDE_DIR=\"$(local_prefix)/include\" \
  1515.       -DSTD_PROTO_DIR=\"$(libsubdir)\" \
  1516.       $(srcdir)/protoize.c
  1517.     touch stamp-proto
  1518.  
  1519. getopt.o: $(srcdir)/getopt.c getopt.h
  1520.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt.c
  1521. getopt1.o: $(srcdir)/getopt1.c getopt.h
  1522.     $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) $(srcdir)/getopt1.c
  1523.  
  1524. # This info describes the target machine, so compile with GCC just built.
  1525. SYSCALLS.c.X: $(srcdir)/sys-types.h $(srcdir)/sys-protos.h $(GCC_PASSES)
  1526.     -rm -f SYSCALLS.c tmp-SYSCALLS.s
  1527.     cat $(srcdir)/sys-types.h $(srcdir)/sys-protos.h > SYSCALLS.c
  1528.     $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  1529.       -aux-info $@ -S -o tmp-SYSCALLS.s SYSCALLS.c
  1530.     -rm -f SYSCALLS.c tmp-SYSCALLS.s
  1531.  
  1532.  
  1533. test-protoize-simple: ./protoize ./unprotoize $(GCC_PASSES)
  1534.     -rm -f tmp-proto.[cso]
  1535.     cp $(srcdir)/protoize.c tmp-proto.c
  1536.     chmod u+w tmp-proto.c
  1537.     ./protoize -N -B ./ -x getopt.h -c "-B./ -Wall -Wwrite-strings \
  1538.       $(CFLAGS) $(INCLUDES) \
  1539.       -DGCC_INCLUDE_DIR=0 \
  1540.       -DGPLUSPLUS_INCLUDE_DIR=0 \
  1541.       -DCROSS_INCLUDE_DIR=0 \
  1542.       -DTOOL_INCLUDE_DIR=0 \
  1543.       -DSTD_PROTO_DIR=0" tmp-proto.c
  1544.     @echo '**********' Expect 400 lines of differences.
  1545.     -diff $(srcdir)/protoize.c tmp-proto.c > tmp-proto.diff
  1546.     -wc -l tmp-proto.diff
  1547.     ./unprotoize -N -x getopt.h -c "-B./ -Wall -Wwrite-strings \
  1548.       $(CFLAGS) $(INCLUDES) \
  1549.       -DGCC_INCLUDE_DIR=0 \
  1550.       -DGPLUSPLUS_INCLUDE_DIR=0 \
  1551.       -DCROSS_INCLUDE_DIR=0 \
  1552.       -DTOOL_INCLUDE_DIR=0 \
  1553.       -DSTD_PROTO_DIR=0" tmp-proto.c
  1554.     @echo Expect zero differences.
  1555.     diff $(srcdir)/protoize.c tmp-proto.c | cat
  1556.     -rm -f tmp-proto.[cso]
  1557.  
  1558. # Build the include directory.  The stamp files are stmp-* rather than
  1559. # stamp-* so that mostlyclean does not force the include directory to
  1560. # be rebuilt.
  1561.  
  1562. # Build the include directory except for float.h (which depends upon
  1563. # enquire).
  1564. stmp-int-hdrs: stmp-fixinc $(USER_H) gvarargs.h gstdarg.h gstddef.h \
  1565.   xlimits.h objc-headers
  1566. # Copy in the headers provided with gcc.
  1567. # The sed command gets just the last file name component;
  1568. # this is necessary because VPATH could add a dirname.
  1569. # Using basename would be simpler, but some systems don't have it.
  1570.     objdir=`pwd`; \
  1571.     cd $(srcdir); \
  1572.     for file in $(USER_H); do \
  1573.       realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \
  1574.       rm -f $$objdir/include/$$realfile; \
  1575.       cp $$realfile $$objdir/include; \
  1576.       chmod a+r $$objdir/include/$$realfile; \
  1577.     done
  1578. %if next-headers
  1579.     rm -f include/bsd/varargs.h
  1580.     -mkdir include/bsd
  1581.     cp $(srcdir)/gvarargs.h include/bsd/varargs.h
  1582.     chmod a+r include/bsd/varargs.h
  1583.     rm -f include/ansi/stdarg.h
  1584.     cp $(srcdir)/gstdarg.h include/ansi/stdarg.h
  1585.     chmod a+r include/ansi/stdarg.h
  1586.     rm -f include/ansi/stddef.h
  1587.     cp $(srcdir)/gstddef.h include/ansi/stddef.h
  1588.     chmod a+r include/ansi/stddef.h
  1589.     rm -f include/ansi/limits.h
  1590.     cp xlimits.h include/ansi/limits.h
  1591.     chmod a+r include/ansi/limits.h
  1592. %else next-headers
  1593.     rm -f include/varargs.h
  1594.     cp $(srcdir)/gvarargs.h include/varargs.h
  1595.     chmod a+r include/varargs.h
  1596.     rm -f include/stdarg.h
  1597.     cp $(srcdir)/gstdarg.h include/stdarg.h
  1598.     chmod a+r include/stdarg.h
  1599.     rm -f include/stddef.h
  1600.     cp $(srcdir)/gstddef.h include/stddef.h
  1601.     chmod a+r include/stddef.h
  1602.     rm -f include/limits.h
  1603.     cp xlimits.h include/limits.h
  1604.     chmod a+r include/limits.h
  1605. %endif next-headers
  1606. # Install the README
  1607.     rm -f include/README
  1608.     cp $(srcdir)/README-fixinc include/README
  1609.     chmod a+r include/README
  1610.     touch stmp-int-hdrs
  1611.  
  1612. # Build the complete include directory.
  1613. stmp-headers: stmp-int-hdrs gfloat.h
  1614.     if [ -d include ]; then true; else mkdir include; fi
  1615. %if next-headers
  1616.     if [ -d include/ansi ]; then true; \
  1617.       else mkdir include/ansi; \
  1618.     fi
  1619.     dir=include/ansi; \
  1620. %else next-headers
  1621.     dir=include; \
  1622. %endif next-headers
  1623.     rm -f $$dir/float.h; \
  1624.     cp gfloat.h $$dir/float.h; \
  1625.     chmod a+r $$dir/float.h
  1626.     touch stmp-headers
  1627.  
  1628. # Running fixincludes requires making sure that xgcc and cpp have been
  1629. # compiled (they are used to get the value of __SIZE_TYPE__).
  1630. # But recompiling xgcc should not force the the header files to be
  1631. # fixed again.  If you want to do that, delete stmp-fixinc.
  1632. fixinc.ready: xgcc cpp
  1633.     -if [ -f fixinc.ready ] ; then \
  1634.         true; \
  1635.     else \
  1636.         touch fixinc.ready; \
  1637.     fi
  1638.  
  1639. # Build fixed copies of system files.
  1640. stmp-fixinc: $(srcdir)/$(FIXINCLUDES) gsyslimits.h fixinc.ready
  1641.     rm -rf include
  1642.     mkdir include
  1643. %if next-headers
  1644.     mkdir include/ansi;
  1645. %endif next-headers
  1646.     if [ x$(FIXINCLUDES) != xMakefile.in ]; \
  1647.     then \
  1648.       for dir in $(SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS); do \
  1649.         if [ -d $$dir ]; \
  1650.         then \
  1651.           $(srcdir)/$(FIXINCLUDES) include $$dir $(srcdir) "`pwd`/xgcc -B`pwd`/"; \
  1652.         else true; fi; \
  1653.       done; \
  1654.     else true; \
  1655.     fi
  1656. %if next-headers
  1657.     dir=include/ansi; \
  1658. %else next-headers
  1659.     dir=include; \
  1660. %endif next-headers
  1661.     rm -f $$dir/syslimits.h; \
  1662.     if [ -f $$dir/limits.h ]; then \
  1663.       mv $$dir/limits.h $$dir/syslimits.h; \
  1664.     else \
  1665.       cp $(srcdir)/gsyslimits.h $$dir/syslimits.h; \
  1666.     fi; \
  1667.     chmod a+r $$dir/syslimits.h
  1668.     touch stmp-fixinc
  1669.  
  1670. # copy objc header files into build directory
  1671. objc-headers: stmp-fixinc
  1672.     if [ -d objc ]; then true; else mkdir objc; fi
  1673.     thisdir1=`pwd`; \
  1674.     srcdir1=`cd $(srcdir); pwd`; \
  1675.     cd objc; \
  1676.     $(MAKE) -f $${srcdir1}/objc/Makefile copy-headers \
  1677.     srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  1678.     GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
  1679.     GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$${thisdir1}/include
  1680.     touch objc-headers
  1681.  
  1682. # Files related to the fixproto script.
  1683.  
  1684. deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs
  1685.     CC="$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(ALL_CPPFLAGS) \
  1686.         -I. -I$(srcdir) -Iinclude -I${SYSTEM_HEADER_DIR} \
  1687. %if next-headers
  1688.         -I${SYSTEM_HEADER_DIR}/bsd \
  1689.         -I${SYSTEM_HEADER_DIR}/ansi \
  1690. %endif next-headers
  1691.     "; \
  1692.       export CC; \
  1693.       $(srcdir)/scan-types.sh "$(srcdir)" > tmp-deduced.h
  1694.     mv tmp-deduced.h deduced.h
  1695.  
  1696. gen-protos: $(HOST_PREFIX)gen-protos.o scan.o $(HOST_LIBDEPS)
  1697.     ${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o gen-protos \
  1698.       $(HOST_PREFIX)gen-protos.o scan.o $(HOST_LIBS)
  1699.  
  1700. $(HOST_PREFIX)gen-protos.o: gen-protos.c scan.h hconfig.h
  1701.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gen-protos.c
  1702.  
  1703. scan.o: scan.c scan.h hconfig.h
  1704.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan.c
  1705.  
  1706. xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos Makefile
  1707.     cat deduced.h $(srcdir)/sys-protos.h > fixtmp.c
  1708.     $(GCC_FOR_TARGET) fixtmp.c -E \
  1709.       | sed -e 's/    / /g' -e 's/ *(/ (/g' -e 's/ [ ]*/ /g' -e 's/( )/()/' \
  1710.       | ./gen-protos >xsys-protos.h
  1711.     rm -rf fixtmp.c
  1712.  
  1713. fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS)
  1714.     $(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o fix-header \
  1715.       fix-header.o scan-decls.o scan.o $(HOST_LIBS)
  1716.  
  1717. fix-header.o: fix-header.c obstack.h scan.h xsys-protos.h hconfig.h
  1718.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/fix-header.c
  1719.  
  1720. scan-decls.o: scan-decls.c scan.h hconfig.h
  1721.     $(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/scan-decls.c
  1722.  
  1723. # stmp-fixproto depends on this, not on fix-header directly.
  1724. # The idea is to make sure fix-header gets built,
  1725. # but not rerun fixproto after each stage
  1726. # just because fix-header's mtime has changed.
  1727. fixhdr.ready: fix-header
  1728.     -if [ -f fixhdr.ready ] ; then \
  1729.         true; \
  1730.     else \
  1731.         touch fixhdr.ready; \
  1732.     fi
  1733.  
  1734. # stmp-headers is to make sure fixincludes has already finished.
  1735. stmp-fixproto: fixhdr.ready fixproto stmp-headers
  1736.     @echo "Various warnings and error messages from fixproto are normal"
  1737.     -if [ -d include ] ; then true; else mkdir include; fi
  1738.     if [ -f include/fixed ] ; then true; \
  1739.     else \
  1740.     CPP="$(GCC_FOR_TARGET) -E"; export CPP; \
  1741.       ${srcdir}/fixproto include include \
  1742.         ansi $(posix_include) $(SYSTEM_HEADER_DIR); \
  1743.       touch include/fixed; \
  1744.     fi
  1745.     touch stmp-fixproto
  1746.  
  1747. # Remake the info files.
  1748.  
  1749. doc: info
  1750. info: $(srcdir)/cpp.info $(srcdir)/gcc.info
  1751.  
  1752. $(srcdir)/cpp.info: cpp.texi
  1753.     cd $(srcdir); $(MAKEINFO) cpp.texi
  1754.  
  1755. #$(srcdir)/gplus.info: gplus.texi
  1756. #    $(MAKEINFO) `echo $(srcdir)/gplus.texi | sed 's,^\./,,'`
  1757.  
  1758. $(srcdir)/gcc.info: gcc.texi extend.texi install.texi invoke.texi \
  1759.         md.texi rtl.texi tm.texi 
  1760.     cd $(srcdir); $(MAKEINFO) gcc.texi
  1761.  
  1762. dvi: $(srcdir)/gcc.dvi $(srcdir)/cpp.dvi
  1763.  
  1764. # This works with GNU Make's default rule.
  1765. $(srcdir)/gcc.dvi: gcc.texi extend.texi install.texi invoke.texi \
  1766.         md.texi rtl.texi tm.texi 
  1767.     $(TEXI2DVI) $<
  1768.  
  1769. # This works with GNU Make's default rule.
  1770. $(srcdir)/cpp.dvi: cpp.texi
  1771.     $(TEXI2DVI) $<
  1772.  
  1773. $(srcdir)/INSTALL: install1.texi install.texi
  1774.     $(MAKEINFO) -D INSTALLONLY --no-header --no-split \
  1775.       `echo $(srcdir)/install1.texi | sed 's,^\./,,'`
  1776.  
  1777. # Deletion of files made during compilation.
  1778. # There are four levels of this:
  1779. #   `mostlyclean', `clean', `distclean' and `realclean'.
  1780. # `mostlyclean' is useful while working on a particular type of machine.
  1781. # It deletes most, but not all, of the files made by compilation.
  1782. # It does not delete libgcc.a or its parts, so it won't have to be recompiled.
  1783. # `clean' deletes everything made by running `make all'.
  1784. # `distclean' also deletes the files made by config.
  1785. # `realclean' also deletes everything that could be regenerated automatically.
  1786.  
  1787.  
  1788. mostlyclean: bytecode.mostlyclean
  1789.     -rm -f $(STAGESTUFF)
  1790. # Clean the objc subdir if we created one.
  1791.     if [ -d objc ]; then \
  1792.       srcdir1=`cd $(srcdir); pwd`; \
  1793.       cd objc; $(MAKE) -f $$srcdir1/objc/Makefile mostlyclean; \
  1794.     else true; fi
  1795.     -rm -f libobjc.a
  1796. # Delete the temporary source copies for cross compilation.
  1797.     -rm -f $(HOST_PREFIX_1)rtl.c $(HOST_PREFIX_1)rtlanal.c
  1798.     -rm -f $(HOST_PREFIX_1)alloca.c $(HOST_PREFIX_1)malloc.c
  1799.     -rm -f $(HOST_PREFIX_1)obstack.c 
  1800. # Delete the temp files made in the course of building libgcc.a.
  1801.     -rm -f tmplibgcc* tmpcopy xlimits.h
  1802.     for name in $(LIB1FUNCS); do rm -f $${name}.c; done
  1803. # Delete other temporary files.
  1804.     -rm -f tmp-float.h tmp-gcc.xtar.gz
  1805.     -rm -f tmp-foo1 tmp-foo2 tmp-proto.* tmp-unproto.1 tmp-SYSCALLS.s
  1806. # Delete the stamp files.
  1807.     -rm -f stamp-* tmp-*
  1808. # Delete debugging dump files.
  1809.     -rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop
  1810.     -rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack
  1811. # Delete some files made during installation.
  1812.     -rm -f specs gfloat.h float.h-* enquire SYSCALLS.c.X SYSCALLS.c
  1813.     -rm -f collect collect2 ld mips-tfile mips-tdump alloca.s
  1814. # Delete files generated for fixproto
  1815.     -rm -rf fix-header xsys-protos.h deduced.h tmp-deduced.h \
  1816.       gen-protos fixproto.list fixtmp.* fixhdr.ready
  1817. # Delete unwanted output files from TeX.
  1818.     -rm -f *.toc *.log *.vr *.fn *.cp *.tp *.ky *.pg
  1819. # Delete sorted indices we don't actually use.
  1820.     -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
  1821. # Delete core dumps.
  1822.     -rm -f core config/core
  1823.  
  1824. # Delete all files made by compilation
  1825. # that don't exist in the distribution.
  1826. clean: mostlyclean bytecode.clean
  1827. # It may not be quite desirable to delete unprotoize.c here,
  1828. # but the spec for `make clean' requires it.
  1829. # Using unprotoize.c is not quite right in the first place, 
  1830. # but what better way is there?
  1831.     -rm -f libgcc.a libgcc1.a libgcc2.a libgcc2.ready libgcc1.null
  1832.     -rm -f *.dvi
  1833.     -if [ -f md.pre-cpp ]; then \
  1834.       rm -f md ; \
  1835.     fi
  1836. # Delete the include directory.
  1837.     -rm -rf stmp-* fixinc.ready include objc-headers
  1838.  
  1839. # Delete all files that users would normally create
  1840. # while building and installing GCC.
  1841. distclean: clean bytecode.distclean
  1842.     -rm -f tm.h aux-output.c config.h config.status tconfig.h hconfig.h
  1843.     -rm -f md md.pre-cpp
  1844.     -rm -f Makefile *.oaux
  1845.     -rm -fr stage1 stage2 stage3 stage4
  1846.     -rm -f cp-parse.output
  1847.     -rm -f objc-parse.output
  1848.     -rm -f c-parse.output
  1849.  
  1850. # Delete anything likely to be found in the source directory
  1851. # that shouldn't be in the distribution.
  1852. extraclean: distclean
  1853.     -rm -rf =* ./"#"* *~* config/=* config/"#"* config/*~*
  1854.     -rm -f patch* *.orig *.rej config/patch* config/*.orig config/*.rej
  1855.     -rm -f config/*/=* config/*/"#"* config/*/*~*
  1856.     -rm -f config/*/*.orig config/*/*.rej
  1857.     -rm -f objc/=* objc/"#"* objc/*~*
  1858.     -rm -f objc/*.orig objc/*.rej
  1859.     -rm -f *.dvi *.oaux *.d *.[zZ] *.gz
  1860.     -rm -f *.tar *.xtar *diff *.diff.* *.tar.* *.xtar.* *diffs
  1861.     -rm -f *lose config/*lose config/*/*lose
  1862.     -rm -f *.s *.s[0-9] *.i install1.texi config/ChangeLog
  1863.     -rm -f djefoo
  1864.  
  1865. # Get rid of every file that's generated from some other file.
  1866. # Most of these files ARE PRESENT in the GCC distribution.
  1867. realclean: distclean bytecode.realclean
  1868.     -rm -f c-parse.y objc-parse.y
  1869.     -rm -f cp-parse.c cp-parse.h cp-parse.output
  1870.     -rm -f objc-parse.c objc-parse.output
  1871.     -rm -f c-parse.c c-parse.h c-parse.output
  1872.     -rm -f cexp.c cexp.output TAGS 
  1873.     -rm -f cpp.info* cpp.??s cpp.*aux
  1874.     -rm -f gcc.info* gcc.??s gcc.*aux
  1875.     -rm -f gplus.info* gplus.??s gplus.*aux
  1876.  
  1877. # Entry points `install' and `uninstall'.
  1878. # Also use `install-collect2' to install collect2 when the config files don't.
  1879.  
  1880. # The semicolon is to prevent the install.sh -> install default rule
  1881. # from doing anything.  Having it run true helps avoid problems and
  1882. # noise from versions of make which don't like to have null commands.
  1883. install: $(INSTALL_TARGET) ; @true
  1884.  
  1885. # Copy the compiler files into directories where they will be run.
  1886. install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
  1887.     install-man install-info
  1888.  
  1889. # Do nothing while making gcc with a cross-compiler. The person who
  1890. # makes gcc for the target machine has to know how to put a complete
  1891. # gcc together by hand.
  1892. install-build: force
  1893.     @echo You have to install gcc on your target machine by hand.
  1894.  
  1895. # Run this on the target machine
  1896. # to finish installation of cross compiler.
  1897. install-cross-rest: install-float-h-cross
  1898.  
  1899. # Install float.h for cross compiler.
  1900. # Run this on the target machine!
  1901. install-float-h-cross: install-dir
  1902. #    if [ -f enquire ] ; then true; else false; fi
  1903. # Note: don't use -.  We should fail right away if enquire was not made.
  1904.     ./enquire -f > $(tmpdir)/float.h
  1905. %if next-headers
  1906.     dir=$(libsubdir)/include/ansi; \
  1907. %else next-headers
  1908.     dir=$(libsubdir)/include; \
  1909. %endif next-headers
  1910.     -rm -f $$dir/float.h; \
  1911.     $(INSTALL_DATA) $(tmpdir)/float.h $$dir/float.h; \
  1912.     -rm -f $(tmpdir)/float.h; \
  1913.     chmod a-x $$dir/float.h
  1914.  
  1915. # Create the installation directory.
  1916. install-dir:
  1917.     -if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; fi
  1918.     -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; fi
  1919. # This dir isn't currently searched by cpp.
  1920. #    -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; fi
  1921.     -if [ -d $(libdir)/gcc-lib/$(target) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target) ; fi
  1922.     -if [ -d $(libdir)/gcc-lib/$(target)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version) ; fi
  1923.     -if [ -d $(libdir)/gcc-lib/$(target)/$(version)/include ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version)/include ; fi
  1924.     -if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; fi
  1925.     -if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; fi
  1926.     -if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; fi
  1927.     -if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; fi
  1928.     -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
  1929. # We don't use mkdir -p to create the parents of mandir,
  1930. # because some systems don't support it.
  1931. # Instead, we use this technique to create the immediate parent of mandir.
  1932.     -parent=`echo $(mandir)|sed -e 's@/[^/]*$$@@'`; \
  1933.     if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
  1934.     -if [ -d $(mandir) ] ; then true ; else mkdir $(mandir) ; fi
  1935.  
  1936. # Install the compiler executables built during cross compilation.
  1937. install-common: native install-dir xgcc $(EXTRA_PARTS)
  1938.     for file in $(COMPILERS); do \
  1939.       if [ -f $$file ] ; then \
  1940.         rm -f $(libsubdir)/$$file; \
  1941.         $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
  1942.       else true; \
  1943.       fi; \
  1944.     done
  1945.     for file in $(EXTRA_PASSES) $(EXTRA_PARTS) $(EXTRA_PROGRAMS) $(USE_COLLECT2) ..; do \
  1946.       if [ x"$$file" != x.. ]; then \
  1947.         rm -f $(libsubdir)/$$file; \
  1948.         $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
  1949.       else true; fi; \
  1950.     done
  1951. # Don't mess with specs if it doesn't exist yet.
  1952.     -if [ -f specs ] ; then \
  1953.       rm -f $(libsubdir)/specs; \
  1954.       $(INSTALL_DATA) specs $(libsubdir)/specs; \
  1955.     fi
  1956. # Install the driver program as $(target)-gcc
  1957. # and also as either gcc (if native) or $(tooldir)/bin/gcc.
  1958.     -if [ -f gcc-cross ] ; then \
  1959.       rm -f $(bindir)/$(target)-gcc; \
  1960.       $(INSTALL_PROGRAM) gcc-cross $(bindir)/$(target)-gcc; \
  1961.       if [ -d $(tooldir)/bin/. ] ; then \
  1962.         rm -f $(tooldir)/bin/gcc; \
  1963.         $(INSTALL_PROGRAM) gcc-cross $(tooldir)/bin/gcc; \
  1964.       else true; fi; \
  1965.       if [ -f cc1plus ] ; then \
  1966.         rm -f $(bindir)/$(target)-g++; \
  1967.         $(INSTALL_PROGRAM) g++-cross $(bindir)/$(target)-g++; \
  1968.         chmod a+x $(bindir)/$(target)-g++; \
  1969.         rm -f $(bindir)/$(target)-c++; \
  1970.         ln $(bindir)/$(target)-g++ $(bindir)/$(target)-c++; \
  1971.       fi ; \
  1972.     else \
  1973.       rm -f $(bindir)/gcc; \
  1974.       $(INSTALL_PROGRAM) xgcc $(bindir)/gcc; \
  1975.       rm -f $(bindir)/$(target)-gcc-1; \
  1976.       ln $(bindir)/gcc $(bindir)/$(target)-gcc-1; \
  1977.       mv $(bindir)/$(target)-gcc-1 $(bindir)/$(target)-gcc; \
  1978.       if [ -f cc1plus ] ; then \
  1979.         rm -f $(bindir)/g++; \
  1980.         $(INSTALL_PROGRAM) g++ $(bindir)/g++; \
  1981.         chmod a+x $(bindir)/g++; \
  1982.         rm -f $(bindir)/c++; \
  1983.         ln $(bindir)/g++ $(bindir)/c++; \
  1984.       fi ; \
  1985.     fi
  1986. # Install protoize if it was compiled.
  1987.     -if [ -f protoize ]; \
  1988.     then \
  1989.         rm -f $(bindir)/protoize; \
  1990.         $(INSTALL_PROGRAM) protoize $(bindir)/protoize; \
  1991.         rm -f $(bindir)/unprotoize; \
  1992.         $(INSTALL_PROGRAM) unprotoize $(bindir)/unprotoize; \
  1993.         rm -f $(libsubdir)/SYSCALLS.c.X; \
  1994.         $(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \
  1995.         chmod a-x $(libsubdir)/SYSCALLS.c.X; \
  1996.     fi
  1997.     -rm -f $(libsubdir)/cpp
  1998.     $(INSTALL_PROGRAM) cpp $(libsubdir)/cpp
  1999.  
  2000. # Install the info files.
  2001. install-info: doc install-dir
  2002.     -rm -f $(infodir)/cpp.info* $(infodir)/gcc.info*
  2003.     cd $(srcdir); for f in cpp.info* gcc.info*; \
  2004.     do $(INSTALL_DATA) $$f $(infodir)/$$f; done
  2005.     -chmod a-x $(infodir)/cpp.info* $(infodir)/gcc.info*
  2006.  
  2007. # Install the man pages.
  2008. install-man: install-dir $(srcdir)/gcc.1 $(srcdir)/cccp.1 $(srcdir)/g++.1
  2009.     -rm -f $(mandir)/gcc$(manext)
  2010.     -$(INSTALL_DATA) $(srcdir)/gcc.1 $(mandir)/gcc$(manext)
  2011.     -chmod a-x $(mandir)/gcc$(manext)
  2012.     -rm -f $(mandir)/cccp$(manext)
  2013.     -$(INSTALL_DATA) $(srcdir)/cccp.1 $(mandir)/cccp$(manext)
  2014.     -chmod a-x $(mandir)/cccp$(manext)
  2015.     -$(INSTALL_DATA) $(srcdir)/g++.1 $(mandir)/g++$(manext)
  2016.     -chmod a-x $(mandir)/g++$(manext)
  2017.  
  2018. # Install the library.
  2019. install-libgcc: libgcc.a install-dir
  2020.     -if [ -f libgcc.a ] ; then \
  2021.       rm -f $(libsubdir)/libgcc.a; \
  2022.       $(INSTALL_DATA) libgcc.a $(libsubdir)/libgcc.a; \
  2023.       if $(RANLIB_TEST) ; then \
  2024.         (cd $(libsubdir); $(RANLIB) libgcc.a); else true; fi; \
  2025.       chmod a-x $(libsubdir)/libgcc.a; \
  2026.     else true; fi
  2027.  
  2028. # Install the objc run time library.
  2029. install-libobjc: libobjc.a install-dir
  2030.     -if [ -f libobjc.a ] ; then \
  2031.       rm -f $(libsubdir)/libobjc.a; \
  2032.       $(INSTALL_DATA) libobjc.a $(libsubdir)/libobjc.a; \
  2033.       if $(RANLIB_TEST) ; then \
  2034.         (cd $(libsubdir); $(RANLIB) libobjc.a); else true; fi; \
  2035.       chmod a-x $(libsubdir)/libobjc.a; \
  2036.     else true; fi
  2037.  
  2038. # Install all the header files built in the include subdirectory.
  2039. install-headers: install-include-dir $(INSTALL_HEADERS_DIR) install-assert-h
  2040. # Fix symlinks to absolute paths in the installed include directory to
  2041. # point to the installed directory, not the build directory.
  2042.     -files=`cd $(libsubdir)/include; find . -type l -print 2>/dev/null`; \
  2043.     if [ $$? -eq 0 ]; then \
  2044.       dir=`cd include; pwd`; \
  2045.       for i in $$files; do \
  2046.         dest=`ls -ld $(libsubdir)/include/$$i | sed -n 's/.*-> //p'`; \
  2047.         if expr "$$dest" : "$$dir.*" > /dev/null; then \
  2048.           rm -f $(libsubdir)/include/$$i; \
  2049.           ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
  2050.         fi; \
  2051.       done; \
  2052.     fi
  2053.  
  2054. # Create or recreate the gcc private include file directory.
  2055. install-include-dir: install-dir
  2056.     -rm -rf $(libsubdir)/include
  2057.     mkdir $(libsubdir)/include
  2058.     -chmod a+rx $(libsubdir)/include
  2059.  
  2060. # Install the include directory using tar.
  2061. install-headers-tar: stmp-headers $(STMP_FIXPROTO) install-include-dir
  2062.     cd include; \
  2063.      (tar cf - .; exit 0) | (cd $(libsubdir)/include; tar $(TAROUTOPTS) - )
  2064. # /bin/sh on some systems returns the status of the first tar,
  2065. # and that can lose with GNU tar which always writes a full block.
  2066. # So use `exit 0' to ignore its exit status.
  2067.  
  2068. # Install the include directory using cpio.
  2069. install-headers-cpio: stmp-headers $(STMP_FIXPROTO) install-include-dir
  2070.     cd include; find . -print | cpio -pdum $(libsubdir)/include
  2071.  
  2072. # Put assert.h where it won't override GNU libc's assert.h.
  2073. # It goes in a dir that is searched after GNU libc's headers;
  2074. # thus, the following conditionals are no longer needed.
  2075. # But it's not worth deleting them now.
  2076. ## Don't replace the assert.h already there if it is not from GCC.
  2077. ## This code would be simpler if it tested for -f ... && ! grep ...
  2078. ## but supposedly the ! operator is missing in sh on some systems.
  2079. install-assert-h: assert.h install-dir
  2080.     if [ -f $(assertdir)/assert.h ]; \
  2081.     then \
  2082.       if grep "__eprintf" $(assertdir)/assert.h >/dev/null; \
  2083.         then \
  2084.         rm -f $(assertdir)/assert.h; \
  2085.         $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
  2086.         chmod a-x $(assertdir)/assert.h; \
  2087.       else true; \
  2088.       fi; \
  2089.     else \
  2090.       rm -f $(assertdir)/assert.h; \
  2091.       $(INSTALL_DATA) $(srcdir)/assert.h $(assertdir)/assert.h; \
  2092.       chmod a-x $(assertdir)/assert.h; \
  2093.     fi
  2094.  
  2095. # Use this target to install the program `collect2' under the name `ld'.
  2096. install-collect2: collect2 install-dir
  2097.     $(INSTALL_PROGRAM) collect2 $(libsubdir)/ld
  2098. # Install the driver program as $(libsubdir)/gcc for collect2.
  2099.     $(INSTALL_PROGRAM) xgcc $(libsubdir)/gcc
  2100.  
  2101. # Cancel installation by deleting the installed files.
  2102. uninstall:
  2103.     -rm -rf $(libsubdir)
  2104.     -rm -rf $(bindir)/gcc
  2105.     -rm -rf $(bindir)/protoize
  2106.     -rm -rf $(bindir)/unprotoize
  2107.     -rm -rf $(mandir)/gcc$(manext)
  2108.     -rm -rf $(mandir)/g++$(manext)
  2109.     -rm -rf $(mandir)/cccp$(manext)
  2110.     -rm -rf $(mandir)/protoize$(manext)
  2111.     -rm -rf $(mandir)/unprotoize$(manext)
  2112.  
  2113. # These exist for maintenance purposes.
  2114.  
  2115. # Update the tags table.
  2116. TAGS: force
  2117.     cd $(srcdir);                            \
  2118.     mkdir temp;                            \
  2119.     mv -f c-parse.[ch] cp-parse.[ch] objc-parse.c cexp.c =*.[chy] temp; \
  2120.     etags *.y *.h *.c;                        \
  2121.     mv temp/* .;                            \
  2122.     rmdir temp
  2123.  
  2124. # Create the distribution tar file.
  2125. #dist: gcc-$(version).tar.gz
  2126. dist: gcc.xtar.gz
  2127.  
  2128. gcc.xtar.gz: gcc.xtar
  2129.     gzip < gcc.xtar > tmp-gcc.xtar.gz
  2130.     mv tmp-gcc.xtar.gz gcc.xtar.gz
  2131.  
  2132. #gcc-$(version).tar.gz: gcc-$(version).tar
  2133. #    gzip < gcc-$(version).tar > gcc-$(version).tar.gz
  2134.  
  2135. #gcc-$(version).tar:
  2136. gcc.xtar: distdir
  2137. # Make the distribution.
  2138.     tar chf gcc.xtar gcc-$(version)
  2139.  
  2140. distdir: doc $(srcdir)/INSTALL c-parse.y objc-parse.y cp-parse.y \
  2141.   c-parse.c cp-parse.c objc-parse.c cexp.c
  2142.     @if grep -s "for version ${mainversion}" gcc.texi > /dev/null; \
  2143.     then true; \
  2144.     else echo "You must update the version number in \`gcc.texi'"; sleep 10;\
  2145.     fi
  2146. # Update the version number in README
  2147.     awk '$$1 " " $$2 " " $$3 == "This directory contains" \
  2148.         { $$6 = version; print $$0 } \
  2149.          $$1 " " $$2 " " $$3 != "This directory contains"' \
  2150.       version=$(version) README > tmp.README
  2151.     mv tmp.README README
  2152.     -rm -rf gcc-$(version) tmp    
  2153. # Put all the files in a temporary subdirectory
  2154. # which has the name that we want to have in the tar file.
  2155.     mkdir tmp
  2156.     mkdir tmp/config
  2157.     mkdir tmp/objc
  2158.     for file in *[0-9a-zA-Z+]; do \
  2159.       ln $$file tmp > /dev/null 2>&1 || cp $$file tmp; \
  2160.     done
  2161.     cd config; \
  2162.     for file in *[0-9a-zA-Z+]; do \
  2163.       if test -d $$file && test "$$file" != RCS; then \
  2164.         mkdir ../tmp/config/$$file; \
  2165.         cd $$file; \
  2166.         for subfile in *[0-9a-zA-Z+]; do \
  2167.           ln $$subfile ../../tmp/config/$$file >/dev/null 2>&1 \
  2168.           || cp $$subfile ../../tmp/config/$$file; \
  2169.         done; \
  2170.         cd ..; \
  2171.       else \
  2172.         ln $$file ../tmp/config >/dev/null 2>&1 \
  2173.         || cp $$file ../tmp/config; \
  2174.       fi; \
  2175.     done
  2176.     cd objc; \
  2177.     for file in *[0-9a-zA-Z+]; do \
  2178.       ln $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \
  2179.     done
  2180.     ln .gdbinit tmp
  2181.     mv tmp gcc-$(version)
  2182. # Get rid of everything we don't want in the distribution.
  2183.     cd gcc-$(version); make -f Makefile.in extraclean
  2184.  
  2185. # make diff oldversion=M.N 
  2186. # creates a diff file between an older distribution and this one.
  2187. # The -P option assumes this is GNU diff.
  2188. diff:
  2189.     diff -rc2P -x c-parse.y -x c-parse.c -x c-parse.h -x objc-parse.y \
  2190.       -x cp-parse.c -x cp-parse.h -x cexp.c -x bi-parser.c \
  2191.       -x objc-parse.c -x TAGS -x "gcc.??" -x "gcc.??s" -x gcc.aux \
  2192.       -x "cpp.??s" -x "cpp.??" -x cpp.aux -x "cpp.info*" -x "gcc.info*" \
  2193.       gcc-$(oldversion) gcc-$(version) > diffs
  2194.  
  2195. # do make -f ../gcc/Makefile maketest DIR=../gcc
  2196. # in the intended test directory to make it a suitable test directory.
  2197. # THIS IS OBSOLETE; use the -srcdir operand in configure instead. 
  2198. maketest:
  2199.     ln -s $(DIR)/*.[chy] .
  2200.     ln -s $(DIR)/configure .
  2201.     ln -s $(DIR)/*.def .
  2202.     -rm -f =*
  2203.     ln -s $(DIR)/.gdbinit .
  2204.     ln -s $(DIR)/$(FIXINCLUDES) .
  2205.     -ln -s $(DIR)/bison.simple .
  2206.     ln -s $(DIR)/config .
  2207.     ln -s $(DIR)/move-if-change .
  2208. # The then and else were swapped to avoid a problem on Ultrix.
  2209.     if [ ! -f Makefile ] ; then ln -s $(DIR)/Makefile .; else false; fi
  2210.     -rm tm.h aux-output.c config.h md
  2211.     make clean
  2212. # You must then run config to set up for compilation.
  2213.  
  2214. bootstrap: force
  2215. # Only build the C compiler for stage1, because that is the only one that
  2216. # we can guarantee will build with the native compiler, and also it is the
  2217. # only thing useful for building stage2.
  2218.     $(MAKE) CC="$(CC)" libdir=$(libdir) LANGUAGES='c objective-c'
  2219.     $(MAKE) stage1
  2220. # This used to define ALLOCA as empty, but that would lead to bad results
  2221. # for a subsequent `make install' since that would not have ALLOCA empty.
  2222. # To prevent `make install' from compiling alloca.o and then relinking cc1
  2223. # because alloca.o is newer, we permit these recursive makes to compile
  2224. # alloca.o.  Then cc1 is newer, so it won't have to be relinked.
  2225.     $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  2226.     $(MAKE) stage2
  2227.     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  2228.  
  2229. bootstrap2: force
  2230.     $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  2231.     $(MAKE) stage2
  2232.     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  2233.  
  2234. bootstrap3: force
  2235.     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) LANGUAGES="$(LANGUAGES)"
  2236.  
  2237. # Compare the object files in the current directory with those in the
  2238. # stage2 directory.
  2239.  
  2240. # ./ avoids bug in some versions of tail.
  2241. compare: force
  2242.     for file in *.o; do \
  2243.       tail +16c ./$$file > tmp-foo1; \
  2244.       tail +16c stage2/$$file > tmp-foo2 2>/dev/null \
  2245.         && (cmp tmp-foo1 tmp-foo2 || echo $$file differs); \
  2246.     done
  2247.     -rm -f tmp-foo*
  2248.  
  2249. # Similar, but compare with stage3 directory
  2250. compare3: force
  2251.     for file in *.o; do \
  2252.       tail +16c $$file > tmp-foo1; \
  2253.       tail +16c stage3/$$file > tmp-foo2 2>/dev/null \
  2254.         && (cmp tmp-foo1 tmp-foo2 || echo $$file differs); \
  2255.     done
  2256.     -rm -f tmp-foo*
  2257.  
  2258. # Copy the object files from a particular stage into a subdirectory.
  2259. stage1: force
  2260.     -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
  2261.     -mv $(STAGESTUFF) stage1
  2262.     -rm -f stage1/libgcc.a
  2263.     -cp libgcc.a stage1
  2264.     -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libgcc.a; else true; fi
  2265.  
  2266. stage2: force
  2267.     -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
  2268.     -mv $(STAGESTUFF) stage2
  2269.     -rm -f stage2/libgcc.a
  2270.     -cp libgcc.a stage2
  2271.     -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libgcc.a; else true; fi
  2272.  
  2273. stage3: force
  2274.     -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
  2275.     -mv $(STAGESTUFF) stage3
  2276.     -rm -f stage3/libgcc.a
  2277.     -cp libgcc.a stage3
  2278.     -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libgcc.a; else true; fi
  2279.  
  2280. stage4: force
  2281.     -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
  2282.     -mv $(STAGESTUFF) stage4
  2283.     -rm -f stage4/libgcc.a
  2284.     -cp libgcc.a stage4
  2285.     -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libgcc.a; else true; fi
  2286.  
  2287. # Copy just the executable files from a particular stage into a subdirectory,
  2288. # and delete the object files.  Use this if you're just verifying a version
  2289. # that is pretty sure to work, and you are short of disk space.
  2290. risky-stage1: force
  2291.     -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
  2292.     -mv $(GCC_PARTS) stage1
  2293.     -rm -f stage1/libgcc.a
  2294.     -cp libgcc.a stage1 && $(RANLIB) stage1/libgcc.a
  2295.     -make clean
  2296.  
  2297. risky-stage2: force
  2298.     -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
  2299.     -mv $(GCC_PARTS) stage2
  2300.     -rm -f stage2/libgcc.a
  2301.     -cp libgcc.a stage2 && $(RANLIB) stage2/libgcc.a
  2302.     -make clean
  2303.  
  2304. risky-stage3: force
  2305.     -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
  2306.     -mv $(GCC_PARTS) stage3
  2307.     -rm -f stage3/libgcc.a
  2308.     -cp libgcc.a stage3 && $(RANLIB) stage3/libgcc.a
  2309.     -make clean
  2310.  
  2311. risky-stage4: force
  2312.     -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
  2313.     -mv $(GCC_PARTS) stage4
  2314.     -rm -f stage4/libgcc.a
  2315.     -cp libgcc.a stage4 && $(RANLIB) stage4/libgcc.a
  2316.     -make clean
  2317.  
  2318. #In GNU Make, ignore whether `stage*' exists.
  2319. .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
  2320. .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
  2321.  
  2322. force:
  2323.  
  2324.  
  2325.  
  2326.  
  2327.